Opened 9 years ago

Closed 5 years ago

#4544 defect closed wontfix (wontfix)

Lore applies quoting to contents of script tags

Reported by: Jonathan Lange Owned by: khorn
Priority: normal Milestone:
Component: lore Keywords: EndOfLore
Cc: Thijs Triemstra Branch:

Description (last modified by Thijs Triemstra)

Lore applies quoting to the contents of script tags, which makes scripts buggy and not work.

e.g. Save this file as /tmp/lore/lore-quote-js.xhtml

    <script type="text/javascript">
      alert("Hello world!");
  • Copy doc/core/howto/template.tpl from Twisted into /tmp/lore/.
  • cd /tmp/lore
  • lore -d .

The contents of the generated javascript in lore-quote-js.html look like:

alert(&quot;Hello world!&quot;);

instead of:

alert("Hello world!");

You ought to be able to open /tmp/lore/lore-quote-js.html in your browser and see an alert dialog box pop up with "Hello world!".

Change History (10)

comment:1 Changed 9 years ago by jknight

It looks like it works if you instead do: <script type="text/javascript"> <![CDATA[

alert("Hello world!");

]]> </script>

which is what you're supposed to do in an xhtml document. Recommend resolving as invalid.

comment:2 Changed 9 years ago by jknight

Argh, didn't quote it right for trac.

<script type="text/javascript">
      alert("Hello world!");

comment:3 Changed 9 years ago by Jean-Paul Calderone

Hm, does it? I tried this, and lore produced this output:

    <script type="text/javascript" xml:space="preserve">
      alert(&quot;Hello world!&quot;);

which looks about equally broken to me.

comment:4 Changed 9 years ago by jknight

Hrmf. :( I had inadvertently run the test on the system copy of lore by accident, which is version 8.2.0. My checkout directory wasn't named "Twisted" so the automagic PYTHONPATH-setting didn't work. :(

Anyways, it used to produce this output:

<script type="text/javascript">
      alert("Hello world!");

That changed in r26264. So, neeeevermind the suggested fix, then.

comment:5 Changed 9 years ago by Jean-Paul Calderone

Damnit. :(

comment:6 Changed 9 years ago by Jean-Paul Calderone

Owner: changed from spiv to khorn

comment:7 Changed 9 years ago by Jean-Paul Calderone

Description: modified (diff)

comment:8 Changed 8 years ago by Thijs Triemstra

Cc: Thijs Triemstra added

Single-quotes seem to work, also see #5380.

comment:9 Changed 8 years ago by Thijs Triemstra

Description: modified (diff)
Milestone: regular-releases

This no longer affects the ReleaseProcess (#5380).

comment:10 Changed 5 years ago by khorn

Keywords: EndOfLore added
Resolution: wontfix
Status: newclosed

Lore is no longer being used for Twisted documentation, and is being deprecated, prior to eventual removal, per #6907.

This issue will not be fixed.

Note: See TracTickets for help on using tickets.