Navigation Menu

Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

[PATCH] Change auto_link to htmlize everywhere #2555

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 6 comments
Closed

[PATCH] Change auto_link to htmlize everywhere #2555

openstreetmap-trac opened this issue Jul 23, 2021 · 6 comments

Comments

@openstreetmap-trac
Copy link

Reporter: LarsF
[Submitted to the original trac issue database at 6.38pm, Sunday, 13th December 2009]

[http://www.openstreetmap.org/user/harmagedon/edits This user] was pointed out on talk-de. I thought it'd be a good idea to add rel="nofollow" to all links so I took the opportunity to change every occurrence of "auto_link" to "htmlize".

But I don't have a running Rails server or much experience with RoR so instead of committing it myself I attached the patch here for someone to at least give it a quick look.

@openstreetmap-trac
Copy link
Author

Author: LarsF
[Added to the original trac issue at 11.54pm, Sunday, 13th December 2009]

The changes to list.html.erb are purely cosmetics and I've accidentally included them in this patch.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 12.07am, Monday, 14th December 2009]

Why do want to change all these auto_link calls to be htmlize calls? We've never claimed to allow html tags in comments so why should we start rendering them now?

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 12.08am, Monday, 14th December 2009]

I meant "in tag values" not "in comments".

@openstreetmap-trac
Copy link
Author

Author: LarsF
[Added to the original trac issue at 12.35am, Monday, 14th December 2009]

The links are rendered now (see the link in my initial post). I just changed the calls from auto_link to htmlize because that includes your recent changes to add rel="nofollow" to all links.

Another option would of course be to leave out auto_link all together and just use h on the comments or change auto_link to use rel="nofollow".
In my opinion I think we should be consistent with user provided text ([18585]) so I chose this way as htmlize seems to be the safest option.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 8.55am, Monday, 14th December 2009]

There is another option of course (which was kind of my point) which is to add the rel=nofollow without also allowing arbitrary html in tags.

@openstreetmap-trac
Copy link
Author

Author: tomhughes
[Added to the original trac issue at 9.09am, Monday, 14th December 2009]

(In [19089]) Add rel=nofollow to links in tags. Closes #2555.

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

No branches or pull requests

1 participant