Escaping velocity code inside form fields does not work properly on xwiki.org

Catalin Hritcu catalin.hritcu at gmail.com
Thu Jun 14 11:25:59 CEST 2007


Hi,

Escaping velocity code inside form fields does not work properly on
xwiki.org. For example any of the following alternatives cause an
error when entered inside a form field (but causes no problem when the
same text is entered inside the body of a normal document):

\#set(\$myfeed=\$xwiki.feed.getFeed(\$feedUrl))

{code}
\#set(\$myfeed=\$xwiki.feed.getFeed(\$feedUrl))
{code}

#literal()
#set($myfeed=$xwiki.feed.getFeed($feedUrl))
#end

Surprisingly a third (old) way to do it works, even in form fields:

{code}
#\set($\myfeed=$\xwiki.feed.getFeed($\feedUrl))
{code}

I was not able to reproduce this problem on my local installation of
XWiki, however on xwiki.org there are many pages that are affected by
this bug:
http://www.xwiki.org/xwiki/bin/view/FAQ/HowToListDocumentsWithACertainPropertyValue
http://www.xwiki.org/xwiki/bin/view/FAQ/HowCanIescapeOutQuotationMarksFromAStringWithVelocity
http://www.xwiki.org/xwiki/bin/view/FAQ/HowDoIFindTheBacklinksForAGivenPage
http://www.xwiki.org/xwiki/bin/view/FAQ/HowDoIEmbedXwikiCodeAsText
http://www.xwiki.org/xwiki/bin/view/FAQ/HowToSetWebPreferences
http://www.xwiki.org/xwiki/bin/view/FAQ/HowDoIIntegrateAnRSSFeedWithinAPage
http://www.xwiki.org/xwiki/bin/view/FAQ/PrepopulateQuestionFieldOnFAQClassSheet

Does any of you have an idea on what might cause this?

Regards,
Catalin




More information about the devs mailing list