Opened 4 years ago

Closed 10 months ago

#4544 defect closed wontfix (wontfix)

Lore applies quoting to contents of script tags

Reported by: jml Owned by: khorn
Priority: normal Milestone:
Component: lore Keywords: EndOfLore
Cc: thijs Branch:
Author: Launchpad Bug:

Description (last modified by thijs)

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

<html>
  <head><title>Hello</title></head>
  <body>
    <h1>Hello</h1>
    <script type="text/javascript">
      alert("Hello world!");
    </script>
  </body>
</html>
  • 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 4 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 4 years ago by jknight

Argh, didn't quote it right for trac.

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

comment:3 Changed 4 years ago by exarkun

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

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

which looks about equally broken to me.

comment:4 Changed 4 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">
//<![CDATA[
      alert("Hello world!");
//]]></script>

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

comment:5 Changed 4 years ago by exarkun

Damnit. :(

comment:6 Changed 4 years ago by exarkun

  • Owner changed from spiv to khorn

comment:7 Changed 4 years ago by exarkun

  • Description modified (diff)

comment:8 Changed 3 years ago by thijs

  • Cc thijs added

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

comment:9 Changed 3 years ago by thijs

  • Description modified (diff)
  • Milestone regular-releases deleted

This no longer affects the ReleaseProcess (#5380).

comment:10 Changed 10 months ago by khorn

  • Keywords EndOfLore added
  • Resolution set to wontfix
  • Status changed from new to closed

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.