Skip to content

Commit cca87f0

Browse files
committed
BLOG-245: Improve blog home page escaping
1 parent 968c6d6 commit cca87f0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

application-blog-ui/src/main/resources/Blog/BlogCode.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
2121
-->
2222

23-
<xwikidoc version="1.4" reference="Blog.BlogCode" locale="">
23+
<xwikidoc version="1.6" reference="Blog.BlogCode" locale="">
2424
<web>Blog</web>
2525
<name>BlogCode</name>
2626
<language/>
@@ -30,9 +30,10 @@
3030
<creationDate>1373016402000</creationDate>
3131
<parent>Blog.WebHome</parent>
3232
<author>xwiki:XWiki.Admin</author>
33+
<originalMetadataAuthor>XWiki.Admin</originalMetadataAuthor>
3334
<contentAuthor>xwiki:XWiki.Admin</contentAuthor>
34-
<date>1749827475000</date>
35-
<contentUpdateDate>1749827475000</contentUpdateDate>
35+
<date>1764057977000</date>
36+
<contentUpdateDate>1764057977000</contentUpdateDate>
3637
<version>1.1</version>
3738
<title>Macros for the Blog application</title>
3839
<comment/>
@@ -736,7 +737,8 @@ $!xwiki.jsx.use($blogScriptsDocumentName)##
736737
* @param entryObj The xobject of the blog post, an instance of the &lt;tt&gt;Blog.BlogPostClass&lt;/tt&gt; xclass.
737738
*###
738739
#macro(displayEntryTitle $entryDoc $entryObj)
739-
#set($escapedRenderedTitle = $services.rendering.escape($entryDoc.getValue('title'), $xwiki.getCurrentContentSyntaxId()))
740+
## This is executed in the context of a global HTML macro, so we need to escape html too
741+
#set($escapedRenderedTitle = $escapetool.html($services.rendering.escape($entryDoc.getValue('title'), $xwiki.getCurrentContentSyntaxId())))
740742
#if($doc.fullName == $entryDoc.fullName)
741743
(% class="entry-title" %)
742744
= $escapedRenderedTitle =

0 commit comments

Comments
 (0)