include-template is a nice way of gluing strings into html. Additionally, using `xexpr->string` will ensure that ‘<‘, ‘>’, and ‘&’ get quoted correctly. However, when a string is inserted into an attribute location, double-quotes must also be quoted. xexpr->string gets this right when called on the whole element: (xexpr->string ‘(a ((href “/abc\”def”)) “foo”)) works just fine. But if I’m trying to insert the string “abc\”def” into an href location using a template, the xexpr->string operation won’t quote the double-quote.
It’s easy to see how to implement this, and the code is right there in xml/writer. Should this be added to the interface, as something like xexpr->attr-string? John -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: PGP signature

