the problem is that sanitizing in special pages (homepage, contact us, nav) leads to html tags being removed. though this is expected behaviour, it destructively interferes with user edits.
an example of this is when the user uses to direct users to their internal link; this gets removed sadly and causes errors when we do yaml.parse post sanitization.
Solution
sanitize the values post parsing rather than treating the yaml as a raw blob
Dependencies
Upgraded yaml from 1.x to 2.x in order to use the reviver/replacer functionality. This operates on the value post parsing, which is what we desire. See here for more info on this.
This is a breaking change but we only use .parse (verified by global search on codebase) so this a safe upgrade for us
Problem
the problem is that sanitizing in special pages (homepage, contact us, nav) leads to html tags being removed. though this is expected behaviour, it destructively interferes with user edits.
an example of this is when the user uses to direct users to their internal link; this gets removed sadly and causes errors when we do yaml.parse post sanitization.
Solution
sanitize the values post parsing rather than treating the yaml as a raw blob
Dependencies
Upgraded
yaml
from 1.x to 2.x in order to use thereviver/replacer
functionality. This operates on the value post parsing, which is what we desire. See here for more info on this.This is a breaking change but we only use
.parse
(verified by global search on codebase) so this a safe upgrade for us