@EduardoTSeoane And another old one I came across. This one is still an issue. I have dug through a lot of code today to try and properly fix this. While there are different ways of getting this right I didn’t want to mess with too much of the code and introduce new problems. In case anyone comes across this, feel free to look into it again and see if there is a better way.
Remove
general encoding of HTML special chars (
in FOGBase class) and add it where needed instead. This would be a lot of places (e.g.
1) because HTML output is generated throughout the code - so re-working pretty much all of that. As well this would also change the output we get from the API for example. Currently HTML encoded for no good reason I think. But changing that could break things for people being used to it.
Another way would be to prevent the whole object from being saved in general when only associations should be set. This happens in many places as well (e.g.
2,
3). Same as above it would mean re-working a lot of the code. Although it’s probably worth it to reduce the amount of unnecessary changes being written to the database (improve performance a little).
So I chose the simplest route of all to just fix this for snapins in dev-branch (
4). It’s not perfect but at least the actual issue is fixed for snapins where chars like " and > are used by people. FOG still messes up those characters in other places, e.g. host/image description.