0 Votes

Modifications pour le document Guide de syntaxe XWiki

Modifié par john le 2026/10/20 18:15

Depuis la version 1.1
modifié par john
sur 2025/01/10 15:27
Commentaire de modification : Install extension [org.xwiki.platform:xwiki-platform-help-ui/16.10.2]
À la version 2.1
modifié par john
sur 2026/10/20 18:15
Commentaire de modification : Install extension [org.xwiki.platform:xwiki-platform-help-ui/17.10.14]

Résumé

Détails

Propriétés de la Page
Contenu
... ... @@ -210,10 +210,13 @@
210 210   #end
211 211   #if($heading)
212 212   (% class="sectionheader" %)
213 - $heading $section.name $heading
213 + $heading $services.rendering.escape($section.name, 'xwiki/2.1') $heading
214 214  
215 215   #end
216 - {{include reference="XWiki.XWikiSyntax${section.id}" section="H${displayVersion}${section.id}"/}}
216 + ## Escape the values used as macro parameters.
217 + #set ($includeReference = $services.rendering.escape("XWiki.XWikiSyntax${section.id}", 'xwiki/2.1'))
218 + #set ($includeSection = $services.rendering.escape("H${displayVersion}${section.id}", 'xwiki/2.1'))
219 + {{include reference="$includeReference" section="$includeSection"/}}
217 217  #end
218 218  
219 219  
... ... @@ -236,7 +236,7 @@
236 236  #macro(syntax_displayCategories $syntaxMenu $translationPrefix)
237 237   #set ($subHeading = '====')
238 238   #foreach ($category in $syntaxMenu)
239 - == $category.name ==
242 + == $services.rendering.escape($category.name, 'xwiki/2.1') ==
240 240  
241 241   #syntax_displayCategory($category.children 'syntax.' '===')
242 242   #end
... ... @@ -300,9 +300,19 @@
300 300  #syntaxSwitch()
301 301  (((
302 302  #set ($query = "syntax=$escapetool.url(${crtSyntaxVer})${extraParams}")
303 -#if ($crtCategory){{html}}<a href="${doc.getURL('view', ${query})}">$syntaxTitle</a>{{/html}}#{else}(% class="current" %)$syntaxTitle#{end}#if ($crtCategory) » #if ($crtSection){{html}}<a href="${crtCategory.url}">${crtCategory.name}</a>{{/html}}#{else}(% class="current" %)${crtCategory.name}#{end}#if ($crtSection) » (% class="current" %)${crtSection.name}#end#end
306 +#if ($crtCategory)
307 + {{html}}<a href="${doc.getURL('view', ${query})}">$syntaxTitle</a>{{/html}} » ##
308 + #if ($crtSection)
309 + {{html}}<a href="${crtCategory.url}">$escapetool.xml($crtCategory.name)</a>{{/html}} » ##
310 + (% class="current" %)$services.rendering.escape($crtSection.name, 'xwiki/2.1')
311 + #else
312 + (% class="current" %)$services.rendering.escape($crtCategory.name, 'xwiki/2.1')
313 + #end
314 +#else
315 + (% class="current" %)$syntaxTitle
316 +#end
304 304  )))
305 -== $syntaxTitle: $sectionName ==
318 +== $syntaxTitle: $services.rendering.escape($sectionName, 'xwiki/2.1') ==
306 306  
307 307  #verticalNavigation($syntaxMenu {'translationPrefix' : 'syntax.', 'crtItemId' : "$!crtItemId", 'cssClass' : 'syntax-menu'})
308 308  ##-----------------------------------------