Skip to content

Broken escape_javascript after SafeBuffer modifications in rails 3.0.8 #1553

@morgoth

Description

@morgoth

After this commit: 53a2c0b
(in rails 3-0-stable branch and present in rails 3.0.8)
javascript_escape connected with rendering template is not working correctly.

<%= escape_javascript(render("partial")) %>

Partial content:

<span> Topics </span>

Results:
rails 3.0.8:

"<span> Topics span>"

rails 3.0.7:

"<span> Topics <\\/span>\\n"

You can play with this bug using sample app: https://github.com/morgoth/escape_javascript_bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions