This is an automated email from the ASF dual-hosted git repository.
snoopdave pushed a commit to branch roller-6.1.x
in repository https://gitbox.apache.org/repos/asf/roller.git
The following commit(s) were added to refs/heads/roller-6.1.x by this push:
new 69d0d5eef Show blogroll names and descriptions as plain text (#231)
69d0d5eef is described below
commit 69d0d5eefd8e6ffcdb3630f0c8affb9453c308ba
Author: David M. Johnson <[email protected]>
AuthorDate: Thu Oct 29 23:10:56 2026 -0400
Show blogroll names and descriptions as plain text (#231)
* Show blogroll names and descriptions as plain text
---
CHANGES.md | 3 ++-
app/src/main/webapp/WEB-INF/velocity/weblog.vm | 10 ++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index 2bee3d9a1..c63e2de41 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -69,7 +69,8 @@
in the log. A feed URL that is not one is dropped. Blogroll links shown on
weblog pages must be relative or use `http`, `https`, `ftp` or `mailto`;
other links, and links with `&` before the path, are shown without a
- target. The blogroll escapes bookmark names and descriptions.
+ target. The blogroll shows bookmark names and descriptions as plain text,
+ without HTML formatting.
- **The user picker matches user names only, except for global admins.** When
a user who is not a global admin searches for users (for example to invite a
member), only user names are matched. Global admins can still search by
diff --git a/app/src/main/webapp/WEB-INF/velocity/weblog.vm
b/app/src/main/webapp/WEB-INF/velocity/weblog.vm
index 2d9886c2e..8ff106515 100644
--- a/app/src/main/webapp/WEB-INF/velocity/weblog.vm
+++ b/app/src/main/webapp/WEB-INF/velocity/weblog.vm
@@ -477,9 +477,15 @@ Show bookmarks as a HTML ul list.
#set($divId = $utils.replace($folderObject.name, " ", "_" ))
#foreach($bookmark in $bookmarks)
<li class="rFolderItem">
+ ## name and description may be stored as sanitized HTML; show them
+ ## as plain text, escaped once
+ #set($bookmarkName = "")
+ #set($bookmarkDescription = "")
+ #set($bookmarkName =
$utils.unescapeHTML($utils.removeHTML($bookmark.name, false)))
+ #set($bookmarkDescription =
$utils.unescapeHTML($utils.removeHTML($bookmark.description, false)))
#if($utils.isNotEmpty($bookmark.Image))
<a href="$utils.escapeHTML($bookmark.url)">
- <img alt="$utils.escapeHTML($bookmark.description)" border="0"
+ <img alt="$!utils.escapeHTML($bookmarkDescription)" border="0"
src="$utils.escapeHTML($bookmark.image)" class="rBookmark"
/></a>
#else
#if($utils.isNotEmpty( $bookmark.FeedUrl))
@@ -487,7 +493,7 @@ Show bookmarks as a HTML ul list.
src="$url.absoluteSite/images/smrssbadge.gif"
alt="$text.get("macro.bookmark.urlFeed")"/></a>
#end
- <a href="$utils.escapeHTML($bookmark.url)"
title="$utils.escapeHTML($bookmark.description)">$utils.escapeHTML($bookmark.name)</a>
+ <a href="$utils.escapeHTML($bookmark.url)"
title="$!utils.escapeHTML($bookmarkDescription)">$!utils.escapeHTML($bookmarkName)</a>
#end
</li>
#end