Re: [xwiki-devs] Fwd: [xwiki-notifications] r15438 - enterprise/trunk enterprise/trunk/wiki platform/core/trunk/xwiki-core/src/main/resources platform/web/trunk/standard/src/main/webapp/templates platform/xwiki-applications/trunk platform/xwiki-appli
On Sun, Jan 18, 2009 at 4:34 PM, Sergiu Dumitriu <[email protected]> wrote:
Asiri Rathnayake wrote:
+ #set($fragments=$attachmentUrl.split($attachmentSignature)) + #if($listtool.size($fragments) == 2) + #set($prefix=$listtool.get($fragments, 0)) + #set($suffix=$listtool.get($fragments, 1)) + #set($davUrl="$prefix$webdavSignature$suffix") + <span class="xwikibuttonlinks"><a class="deletelink"
href="javascript:davEdit('$davUrl')">$msg.get("webdaveditattachment")</a></span>
You should escape $davUrl, because if it contains ' or " it will break.
I tried to do this but for some reason the url got changed to an invalid one once i escaped it. It's kind of weird, the local application tried to open some url like /home/asiri/http://..... I'm still not sure why this happens.
How exactly did you try to escape it? A simple .replaceAll('"', '"').replaceAll("'", ''') should do it.
Fixed. Thanks. - Asiri
participants (1)
-
Asiri Rathnayake