From 10d9cea7fd9e3326513659e81be7f4ca361f9730 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Thu, 13 Aug 2026 06:40:45 -0600 Subject: [PATCH] Use double-quoted attributes in the media file links inserted into new entries The "create a post from your uploaded files" flow built its image and enclosure markup with single-quoted attributes and an invalid closing tag, and the resulting image did not render after publishing. The media chooser on the entry editor already inserts the same link with double quotes and a self-closing img tag, and that form works, so this flow now matches it. Reported by Greg Huber on dev@roller. --- .../weblogger/ui/struts2/editor/EntryAddWithMediaFile.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryAddWithMediaFile.java b/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryAddWithMediaFile.java index 40c67e39b5..ef5512820e 100644 --- a/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryAddWithMediaFile.java +++ b/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryAddWithMediaFile.java @@ -76,14 +76,14 @@ public String execute() { if (mediaFile.isImageFile()) { link = "

" + mediaFile.getName() + "

"; - link += "<name>"; + link += "\">\" alt=\"\" width=\"\" height=\"\" />"; link = link.replace("", mediaFile.getPermalink()) .replace("", mediaFile.getThumbnailURL()) .replace("", mediaFile.getName()) .replace("", ""+mediaFile.getThumbnailWidth()) .replace("", ""+mediaFile.getThumbnailHeight()); } else { - link = " ( bytes, )"; + link = "\"> ( bytes, )"; link = link.replace("", mediaFile.getPermalink()) .replace("", mediaFile.getName()) .replace("",""+mediaFile.getLength()) @@ -97,7 +97,7 @@ public String execute() { sb.append("

") .append(getText("mediaFileEdit.includesEnclosure")) .append("
") - .append("") + .append("") .append(bean.getEnclosureURL()) .append("

"); }