Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I recall that I once found that rails wasn't displaying HTML and it was a security feature.
- For some reason though I find that now I can't get that situation where HTML doesn't display
- So
- This is my controller
- > class AbcController < ApplicationController
- > def def
- > @faf="<a href=\"a/b/c.html\">aaa</a>"
- > end
- > end
- This is my view
- > <h1>Abc#def</h1>
- > <% a="<>" %>
- > <%= a %><br>
- > <% puts a %>
- > <% a="<a href=\"asdf/wer\">rrrrr</a>" %>
- > <%= a %><br>
- > <% @b="<a href=\"asdf/wer\">rrrrr</a>" %>
- > <%= @b %><br>
- > zzzzz<br>
- > <%= @faf %>
- And the output is
- > Abc#def
- > <>
- > <a href="asdf/wer">rrrrr</a>
- > <a href="asdf/wer">rrrrr</a>
- > zzzzz
- > <a href="a/b/c.html">aaa</a>
- Every single hyperlink is displayed!
- Why is that?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement