Details
-
Type:
Bug
-
Status:
Verified
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 6.1.1 CE GA2, 6.1.20 EE GA2
-
Fix Version/s: None
-
Component/s: Collaboration, Collaboration > Blogs
-
Labels:None
-
Fix Priority:3
-
Similar Issues:
Description
Steps to reproduce:
1. create a blog entry. Pretend you're blogging about HTML, use the following text:
If you link to server-relative files you can do it like <a href="/some-file">this</a> or, with image, like <img src="/some-file.png"/> this
(Note that this is the actual HTML text, not the source!)
2. access the blog's RSS feed. The text you'll find in there (with the default "full content" displayed) is:
If you link to server-relative files you can do it like <a href="http://localhost:8080/some-file">this</a> or, with image, like <img src="http://localhost:8080/some-file.png"/> this
(or whatever your current portal URL is).
The offending code is from BlogsEntryServiceImpl:
if (displayStyle.equals(RSSUtil.DISPLAY_STYLE_ABSTRACT)) { ... // shortened } else if (displayStyle.equals(RSSUtil.DISPLAY_STYLE_TITLE)) { value = StringPool.BLANK; } else { value = StringUtil.replace( entry.getContent(), new String[] { "href=\"/", "src=\"/" }, new String[] { "href=\"" + themeDisplay.getURLPortal() + "/", "src=\"" + themeDisplay.getURLPortal() + "/" }); }
i.e. blind replacement of the href and src sequences, no matter if they're markup or text.
