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
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs