Forum OpenACS Development: HTML or quotes in Xowiki links error

Collapse
Posted by Dave Bauer on
We get a server error if somehow HTML with quotes gets inside the [[ ]] links in xowiki content source view.

For example:

 [[<span id="st" name="st" class="st">traffic</span>]] 

gives this error:

extra characters after close-quote     while executing "my anchor  " " "<span id="st" name="st" class="st">traffic</span>"]  "     invoked from within "subst [regsub -all $re [string map {\[ \\[ \] \\] \$ \\$ \\ \\\\} $string]  "\[$cmd\]

I am not sure how to protect against this, or what the proper response to the user should be.

This resulted from a copy/paste into the xowiki xinha textarea.

Collapse
Posted by Gustaf Neumann on
the link you provided [[traffic]] does not contain quotes, these were maybe stripped by the html-input. in order to protect against doublequotes in links, add

backslash doublequote space backslash backslash backslash doublequote

to the string map in "Page instproc regsub-eval". then it does not spit out errors and one can work with this and create page names with the quote. There will be a problem with providing the doublequote in return_urls, which i have not tracked down, but i doubt this is terribly inportant, since the quote is most likely a mistake...

This fix will be included in the next version

-gustaf