Commit Graph

9 Commits

Author SHA1 Message Date
Javi Martín
928312e218 Use sanitize in translations with links
Sometimes we're interpolating a link inside a translation, and marking
the whole translations as HTML safe.

However, some translations added by admins to the database or through
crowdin are not entirely under our control.

Although AFAIK crowdin checks for potential cross-site scripting
attacks, it's a good practice to sanitize parts of a string potentially
out of our control before marking the string as HTML safe.
2019-10-08 18:46:21 +02:00
Javi Martín
2aabf79fb4 Rename methods to add auto links to HTML
The name `safe_html_with_links` was confusing and could make you think
it takes care of making the HTML safe. So I've renamed it in a way that
makes it a bit more intuitive that it expects its input to be already
sanitized.

I've changed `text_with_links` as well so now the two method names
complement each other.
2019-10-08 18:46:20 +02:00
Javi Martín
c62da726b8 Apply SpaceAroundErbTag ERB Lint rule 2019-09-10 20:02:15 +02:00
Julian Herrero
f6489bc604 Use double quotes in app/views 2019-03-19 12:33:07 +01:00
Alberto Garcia Cabeza
e8312ff86a fixes text format on direct messages 2016-10-18 16:40:59 +02:00
rgarcia
18dd9c95f3 fixes specs 2016-06-16 12:06:26 +02:00
Alberto Garcia Cabeza
c83e831cb7 Adds link to not receive direct messages 2016-06-15 21:28:17 +02:00
rgarcia
90148ffdca adds missing translation 2016-06-15 11:34:33 +02:00
rgarcia
ce6072d17b sends a copy of the direct message to the sender 2016-06-14 18:55:28 +02:00