This project is archived and is in readonly mode.
Should not html_escape auto_link block form
-
Mislav
- Tag changed from patch, rack, session to auto_link, block, escape, html, patch
I support this change, but only after Rails 2.3.
I wouldn't change any behavior (however obscure it may be) now that RC 2 was out.
-
Duff OMelia
Sounds great to me.
-
Mislav
Hey Duff,
I've added my auto_link patches to #1862 Running autolink on text containing a mailto: link breaks
They add a test that shows you can output HTML content from the block if you use the
rawhelper. Removingh()wasn't necessary at all in Rails 3 (but I still did it, for clarity).New XSS protection in Rails handles HTML-escaping magically.
-
Repository
- State changed from new to resolved
(from [17b4fd25e4de8f05d40ccaa776e51636745aa8e8]) avoid auto_linking already linked emails; more robust detection of linked URLs
References #1523 auto_link should not linkify URLs in the middle of a tag [#1862 Running autolink on text containing a mailto: link breaks state:resolved] [#3591 auto_link should not create a link inside a link which has the rel attribute state:resolved]
Add test that shows how link text can contain HTML if needed:
the trick is using block form in combination withraw.
Let link text be automatically HTML-escaped[#2017 Should not html_escape auto_link block form state:resolved] http://github.com/rails/rails/commit/17b4fd25e4de8f05d40ccaa776e516...
-
Repository
(from [8f0b2138ee979799092e0489f7298289c90901b9]) avoid auto_linking already linked emails; more robust detection of linked URLs
References #1523 auto_link should not linkify URLs in the middle of a tag [#1862 Running autolink on text containing a mailto: link breaks state:resolved] [#3591 auto_link should not create a link inside a link which has the rel attribute state:resolved]
Add test that shows how link text can contain HTML if needed:
the trick is using block form in combination withraw.
Let link text be automatically HTML-escaped[#2017 Should not html_escape auto_link block form state:resolved] http://github.com/rails/rails/commit/8f0b2138ee979799092e0489f72982...
