Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Script tag in prototype_helper rdoc causing formatting issue in API

#5537

In the doc body found here: http://github.com/rails/rails/blob/master/actionpack/lib/action_vie...

There is a script tag in the middle of a sentence (under class JavaScriptGenerator), just before the words "Ajax response bodies, either in a" and it is causing the documentation for this page to be ruined on the API, found here:

http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelp...

See screenshot.

Reported by justin · September 2nd, 2010 @ 09:38 PM

State: duplicate
Milestone: none
Assigned to: Rohit Arondekar Rohit Arondekar
Importance: Low

Activity

  1. Jeff Kreeftmeijer
    Jeff Kreeftmeijer

    I've included a patch that replaces every occurrence of <script> with +script+ in the ActionView::Helpers::PrototypeHelper RDocs.

    I wanted to escape the whole tag (including the "<" and ">"), but stuff like + doesn't work. Is there any other way to do this? It could be fixed by doing something like @+&lt;script&gt;+@, but that would make it a lot less readable when reading the actual file instead of the generated RDocs.

    Thoughts? :)

    September 5th, 2010 @ 03:01 PM

  2. David Trasbo
    David Trasbo

    Jeff,

    Another option is to wrap <script> in a <tt> tag. I've attached a patch that does just that - it also makes sure to wrap at 80 characters.

    September 5th, 2010 @ 07:28 PM

  3. David Trasbo
  4. justin
    justin

    Thanks guys, so I guess your doc engine changed since it looks like that code doc with the SCRIPT tag has been there for a while.

    September 5th, 2010 @ 09:11 PM

  5. Mark Mulder
  6. David Trasbo
    David Trasbo
    • Assigned user set to Rohit Arondekar

    Mark,

    It is - the commit that #5520 Online Rails 3 documentation has unescaped <script> tags links to was created by me to resolve this ticket.

    This too can be marked as resolved or duplicate.

    September 7th, 2010 @ 03:14 PM

  7. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to duplicate
    • Importance changed from to Low

    September 8th, 2010 @ 02:59 AM

  8. Repository