This project is archived and is in readonly mode.
auto_link should not linkify URLs in the middle of a tag
-
Eugene Pimenov
The last comment was about a href=" check, because it's in the middle of a tag either.
-
Henrik Nyh
Just ran into this, upgrading an app from 2.2 to 2.3.
auto_link('
') in 2.2: auto_link('
')
in 2.3: auto_link('http://google.com/image.jpg" />')
-
Henrik Nyh
Let's try that again.
auto_link('<a href="http://google.com"><img src="http://google.com/image.jpg" /></a>')in 2.2:
<a href="http://google.com"><img src="http://google.com/image.jpg" /></a>in 2.3:
<a href="http://google.com"><img src="<a href="http://google.com/image.jpg">http://google.com/image.jpg</a>" /></a> -
Mislav
Good catch -- it definitely slipped my mind.
I would only change the check like this:
if left =~ /<[^>]+$/ && right =~ /^[^<]+>/Now the right regexp reflects the left.
-
Repository
- State changed from new to resolved
(from [bdfa733d04c5843eadc181f2fd1723db614fc3d0]) Ensure auto_link doesnt linkify URLs in the middle of a tag [#1523 auto_link should not linkify URLs in the middle of a tag state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
