[closure-devel] How to disable <span class="illegalstyle"> from being generated?

Andrei Stebakov lispercat at gmail.com
Fri Mar 4 20:25:53 UTC 2011


I agree that style of the html code I sometimes get leaves much to be desired.
In this case there is a <style> tag located inside <td> element. So
chtml:parse injects the illegalstyle span in the code.

(serialize-to-string
 (chtml:parse "
<table>
  <tr><td>
  <style type='text/css'>
    .someClass {
      width: 26px;
	   height:26px;
    }
  </style>
  some data
  </td></tr></table>
"
(stp:make-builder)))

Will produce
<html><head></head><body><table><tbody><tr><td>
  <span class=\"illegalstyle\">
    .someClass {
      width: 26px;
	   height:26px;
    }
  </span>
  some data
  </td></tr></tbody></table>
</body></html>

How do I disable this from being generated?

Thank you,
Andrei




More information about the closure-devel mailing list