ai2html
ai2html copied to clipboard
slugify the box (group container) ID too
- If ai2html is used on an Illustrator file name containing invalid element ID characters (anything not alphanumeric/hyphen/underscore), then the group container's ID breaks down.
Currently, if you run ai2html on a file with spaces and other non-alphanumeric/hyphen/underscore characters (e.g. named test-1288px copie. (weird chars) .ai):
The fix would escape these invalid characters, like it does on the IDs and class names of img, div elements in the HTML output:
- Intrigued that aside from the top "tktk-box" container ID, all the other IDs on images, text elements, etc., seem properly escaped! I dug a bit, but not exhaustively as to why/where the escape functions were being applied...