[openstreetmap/openstreetmap-website] Stray <br/> in 'confirmation email resent'-message (#3215)
Andy Allan
notifications at github.com
Tue Jun 8 15:50:27 UTC 2021
I wasn't aware of this particular error, but I've wrestled with html in our flash messages before and it's a bit of a nightmare.
Rails flash [only allows](https://api.rubyonrails.org/classes/ActionDispatch/Flash.html) `String`, `Array` and `Hash` as flash objects, notably not `SafeBuffer`. So if we output the raw string (via `raw` or marking it as `.html_safe`) then we get problems like https://github.com/openstreetmap/openstreetmap-website/issues/1027 . If we let rails escape the `String`, then we get problems like this issue.
I'm not sure what the best approach is, so any suggestions are welcome.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3215#issuecomment-856888164
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210608/6b2e9d07/attachment.htm>
More information about the rails-dev
mailing list