utsa-asc / college-dls

design language system for the University of Texas at San Antonio
7 stars 3 forks source link

CMS: Character code is showing in title tag #731

Closed lalov1 closed 7 months ago

lalov1 commented 7 months ago

I've noticed the character code is showing in the title of some pages with ampersands or other characters. This is from title being escaped, so I don't know if there is any way around this. Image

https://walledev.it.utsa.edu/entity/open.act?id=923d1b3c81736a1b6bf065e1d9394051&type=format

garza-utsa commented 7 months ago

hmm, which page is this? it would only be double escaping if the title is actually "&" and not "&"

https://walle.it.utsa.edu/render/page.act?id=58969ce981736a2d3d00f35ca379dc4d&confId=fac5abec81736a2d1860fc5845a50771&demarcate=false&fullscreen=true

lalov1 commented 7 months ago

https://klesse.utsa.edu/civil-environmental-construction-management/

I wonder if it's because it's escaped at the top, but then escaped at the bottom again.

garza-utsa commented 7 months ago

oh haha, it totally is lol, let me add the trim up top and remove it

garza-utsa commented 7 months ago

##
#set ( $callingPage = $currentPage.metadata )
#set ( $title = $_EscapeTool.xml($callingPage.title.trim()) )
#set ( $displayName = $_EscapeTool.xml($callingPage.displayName.trim()) )
#set ( $name = $_EscapeTool.xml($currentPage.name.trim()) )
#set ( $fullSiteName = $_EscapeTool.xml($siteSetup.metadata.title).trim() )
##
## title: ${title}
## dn: ${displayName}
## name: ${name}
## $_PropertyTool.outputProperties($currentPage)
## $_PropertyTool.outputProperties($callingPage)
##
#set ( $outputTitle = $displayName )
#if ( $_PropertyTool.isEmpty($outputTitle) )
    #set ( $outputTitle = $title )
#end
#if ( $_PropertyTool.isEmpty($displayName) and $_PropertyTool.isEmpty($title) )
    #set ( $outputTitle = $name )
#end
#set ( $outTitle = $outputTitle )
##
${outTitle} | $fullSiteName | UTSA | University of Texas at San Antonio
garza-utsa commented 7 months ago

remove repeated EscapeTool.xml calls