Menu

#23 Always output a closing </script> tag

None
open
nobody
None
2013-01-09
2011-01-04
No

Currently, in XHTML mode, Kajiki outputs javascript imports as self-closing tags, like this:
<script src='/static/js/somescript.js' />

That does not work:
http://stackoverflow.com/questions/69913/why-dont-self-closing-script-tags-work

Although that should be accepted by Kajiki as input, when outputting it should always write:
<script src='bla'></script>

Related

Discussion: Kajiki and HTML and XML modes

Discussion

  • Anonymous

    Anonymous - 2011-11-16

    Hear hear. I had to put literal('') inside my script tag to avoid incorrect output!

     
  • Erich Seifert

    Erich Seifert - 2013-01-09

    Always outputting <script></script> may not be desirable for all XML documents. My approach to address this issue was to introduce a new 'xhtml' mode in the XMLTemplate class. It uses a new minimal set of XHTML tags that may be omitted for XHTML.

    A new mode is probably a rather big change, but I'll attach the patch against Kajiki 0.3.5 for discussion.

     

Anonymous
Anonymous

Add attachments
Cancel