|
Hello, I'm testing the osqa software and everything seems to work but I'm now having one problem when posting because I can write in the Markdown editor the backslash character and it is shown in the preview, and also when editing the message it appears again but when I enter the question it is shown weird, as if it have some problem regarding encoding or something else. The issue appears when I try to use backslashes in html code, since I'm trying to setup LaTeX and in the mean time I will use this kind of "cheat" using images instead of jsMath. The problem appears when I try to put something like this:
The problem is this one:
If I use Markdown code instead of html it works. Why this happens?
Using markdown image code:
In the preview, I see everything OK but in the question body after loading the page the backslashes are changed by something weird as you can see. |
|
That's because the html is sanitized in the input, and for some reason the sanitizer doesn't like your image tags :) The library responsible for the sanitization is html5lib, which is very powerfull and customizable, but at this point, the only option to configure it is by editing the source, under forum/utils/html.py . But even if you dont input html... See: frac{3}{5} I have written a backslash which vanishes.
(27 Jul '10, 06:38)
miguidotcom
Yes, but is definitely the sanitizer that is doing is stuff. The idea is to make XSS attacks and that kind of crap impossible. I was thinking that one thing that may be usefull in your case is to plug in the markdown2latex extension see http://www.rufuspollock.org/2008/06/23/markdown2latex-mkdn2latex-12/ (the site is down in this exact moment)
(27 Jul '10, 08:58)
Hernani Cerq... ♦♦
|
|
i think it may not be somthing you need. but you can use %5C instead of slash
1
Yes, but the point is to let the people write the backslash in the edit and then, show in the main text. I modified the showdown.js and was able to emulate som bbcode with regexp, but after sending it and showing in the main body, the string is shown without being replaced any more.
(27 Jul '10, 17:17)
miguidotcom
|