Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ public String execute() {

if (mediaFile.isImageFile()) {
link = "<p>" + mediaFile.getName() + "</p>";
link += "<a href='<url>'><img src='<urlt>' alt='<name>' width='<width>' height='<height>'></img></a>";
link += "<a href=\"<url>\"><img src=\"<urlt>\" alt=\"<name>\" width=\"<width>\" height=\"<height>\" /></a>";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the fix is the missing / of this line and the quote change is to match other generated code? I see usage of both href=' and href=" but double quote is more common so thats good.

link = link.replace("<url>", mediaFile.getPermalink())
.replace("<urlt>", mediaFile.getThumbnailURL())
.replace("<name>", mediaFile.getName())
.replace("<width>", ""+mediaFile.getThumbnailWidth())
.replace("<height>", ""+mediaFile.getThumbnailHeight());
} else {
link = "<a href='<url>'><name></a> (<size> bytes, <type>)";
link = "<a href=\"<url>\"><name></a> (<size> bytes, <type>)";
link = link.replace("<url>", mediaFile.getPermalink())
.replace("<name>", mediaFile.getName())
.replace("<size>",""+mediaFile.getLength())
Expand All @@ -97,7 +97,7 @@ public String execute() {
sb.append("<p>")
.append(getText("mediaFileEdit.includesEnclosure"))
.append("<br />")
.append("<a href='" + bean.getEnclosureURL() + "'>")
.append("<a href=\"" + bean.getEnclosureURL() + "\">")
.append(bean.getEnclosureURL())
.append("</a></p>");
}
Expand Down
Loading