Skip to content

Commit e9d10d4

Browse files
aforciermaxme
authored andcommitted
Updated legacy editor to place captions the same way as the web editor and visual editor (before the [/caption] closing tag)
1 parent 5d688bd commit e9d10d4

File tree

1 file changed

+2
-2
lines changed
  • WordPressUtils/src/main/java/org/wordpress/android/util/helpers

1 file changed

+2
-2
lines changed

WordPressUtils/src/main/java/org/wordpress/android/util/helpers/MediaFile.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ public String getImageHtmlForUrls(String fullSizeUrl, String resizedPictureURL,
330330
fullSizeUrl, mediaTitle, alignmentCSS, resizedPictureURL);
331331

332332
if (!TextUtils.isEmpty(getCaption())) {
333-
content = String.format("[caption id=\"\" align=\"%s\" width=\"%d\" caption=\"%s\"]%s[/caption]",
334-
alignment, getWidth(), TextUtils.htmlEncode(getCaption()), content);
333+
content = String.format("[caption id=\"\" align=\"%s\" width=\"%d\"]%s%s[/caption]",
334+
alignment, getWidth(), content, TextUtils.htmlEncode(getCaption()));
335335
}
336336

337337
return content;

0 commit comments

Comments
 (0)