From: Reini U. <ru...@x-...> - 2001-03-06 03:16:35
|
Steve Wainstead schrieb: > Hi Reini, sorry for the delay... I've already implemented it now in my AcadWiki. To support some multiline blocks (verbatim, code and nowiki) I've made a seperate loop to avoid looping all other transformer funcs. This block is completely protected from further wiki transformations, only htmlchars are enforced to avoid HTML inline code. code is asis, verbatim and nowiki converts "<" to "<" ... But to overcome <code><html><script><!-- do something bad --></script></html></code> A special regex checks for </?[a-z]{1,6}> strings inside the code block and transforms < to < then. I want <code> to support arbitrary pasted code in every language. (lisp, c, perl, php, java, ...) There the comparison characters "<" and ">" should not appear too close. if (a < 2 || a > 4) is no html tag. but if (2<a>4) is one. is this valid code in some exotic language? when pasting from the wiki you'll otherwise get the ugly < and > chars. > After thinking for a bit about the problem, I always come back to the idea > of "token substitution." ... thanks for your description. this can be used to disable <script> and other malicious tags then. (as in meatball) -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |