openSUSE / suse-xsl

DocBook XSL Stylesheets for SUSE branding
Other
11 stars 10 forks source link

JSON-LD: Remove quotes in headlines & descriptions #569

Closed tomschr closed 10 months ago

tomschr commented 11 months ago

Problem

If a text contains "quotes", this text will create a syntax error for JSON. Either the quotes need to be masked or removed. I decided to remove them with translate().

First discovered for /de-de/sles/15-SP1/html/SLES-all/cha-apache2.html.

Solution

This PR adds the XPath function translate() to remove and quotes. Although this is not entirely accurate, it's probably the easiest and fastest solution.