This PR fixes what seems to be a bug in the string serialisation for expressions.
The ampersand & character got escaped into \h which, besides not being the right string, also isn't a valid according to jp.ParseString, eg (https://go.dev/play/p/BDjHacoE4Hu):
This PR fixes what seems to be a bug in the string serialisation for expressions.
The ampersand
&
character got escaped into\h
which, besides not being the right string, also isn't a valid according tojp.ParseString
, eg (https://go.dev/play/p/BDjHacoE4Hu):Shows the error:
I've added some basic tests covering this, but I'm unfamiliar with other parts of the code. I think the only place this is relevant is in https://github.com/ohler55/ojg/blob/aede9eca61caea2834d4521db8238614991550b4/string.go#L61-L69, where it seems to be parting HTML, where
&
is special. I think the mapping got copied over and this bug sneaked in.