Or .escaped or .plain or whatever you want to call it.
Currently, because string is automatically evaluated, [code]
and {options}
are processed too. This is pretty annoying if that string is meant to be returned and put into the HTML as-is, not evaluated at all. So I have to find-replace [
, ]
, {
, and }
characters to escape them all manually.
This could be done with a .raw
property on strings, for example–to make it easier for creators to do this. (I’m guessing this would be a fairly common things people need to do, when working on non-trivial plugins, etc.)
Yep, something like perchance.org/literal-plugin could definitely be built in - it’s a fair request. I thought you were asking for something different (i.e. stop the actual evaluation at some point in the engine vs just escaping it), though I’m not sure if my original interpretation even makes sense, or wouldn’t just be equivalent to escaping right before output to HTML anyway.
Yeah skipping processing for a given string would be ideal, but I know it’s super deeply integrated into everything currently. Just the escaping getter is all 👍