Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto_link removes options from existing a tags #21

Open
swrobel opened this issue Aug 14, 2012 · 7 comments
Open

auto_link removes options from existing a tags #21

swrobel opened this issue Aug 14, 2012 · 7 comments

Comments

@swrobel
Copy link

swrobel commented Aug 14, 2012

auto_link seems to remove html options from existing <a> tags in my code. For example:

auto_link('<a href="http://google.com" target="_blank">Here</a>')

returns

<a href="http://google.com">Here</a>

This definitely doesn't seem like expected behavior...

@homakov
Copy link
Contributor

homakov commented Aug 15, 2012

gem version? it was fixed

@swrobel
Copy link
Author

swrobel commented Aug 16, 2012

1.0.9

@kentor
Copy link

kentor commented Oct 17, 2012

it's not fixed. using 1.0.9

@tmlee
Copy link

tmlee commented Mar 3, 2013

the auto_link method by default sanitizes everything coming its way.
perhaps add a :sanitize => false?

auto_link('<a href="http://google.com" target="_blank">Here</a>', :sanitize => false)

or handle the case where target is inserted into the attribute?

@heaven
Copy link

heaven commented Jun 27, 2013

Still in 1.1.0

@heaven
Copy link

heaven commented Jun 27, 2013

Oops, :sanitize => false works, thank you.

@zackshapiro
Copy link

@tmlee Thanks for the fix! Works well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants