: How do I allow " to render rather than " in inkscape? I am developing a tool that will take Inkscape made SVG files. I want to make it so I enter various tagings like {{="test this"}}
I am developing a tool that will take Inkscape made SVG files.
I want to make it so I enter various tagings like {{="test this"}}
And my renderer, made it myself, would then replace the item with properly escape and valid stuff in the svg.
Similar to the way one might use and HTML document template I am doing it as an SVG.
Is there a way for me to edit the file in Inkscape and not have to worry about manually going in and replacing all my " parts with actually "?
There may be other characters too, just haven't looked yet.
The idea is that a designer makes very little changes in hist svg to make a dynamic image with a controller passing a context to it.
Here is a video of the issue:
More posts by @Pope1402555
2 Comments
Sorted by latest first Latest Oldest Best
SVG documents have to be valid XML. There are 5 forbidden characters in XML that you have to escape with entities:
" is written "
' is written '
< is written <
> is written >
& is written &
… and note that it is only those 5 — the HTML entities are not there in an XML parser.
If you put any un-escaped versions of the above characters into your SVG document, it stops being an SVG document and becomes a plain text document that looks a little like XML. You can’t expect that document to be rendered as an SVG graphic.
I solved it by added a special processor to my templates before I run the code in them.
Basicaly anything inside {{ and }} I checked for charactors like the " and replaced them with "
This seems to do this trick. Thanks for the advice! This will let the designers easily do what they want with out having too big an issue.
I used this as a helper if all the charactors that could have an issue. www.theukwebdesigncompany.com/articles/entity-escape-characters.php
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.