[cleanupIDs] symbol
is incorrectly removed when its ID is only used by URL-encoded reference
#1696
Labels
symbol
is incorrectly removed when its ID is only used by URL-encoded reference
#1696
Describe the bug
symbol
is incorrectly removed when its ID is only used by URL-encoded reference.Example files: https://gist.github.com/ctrlcctrlv/a985bd9fdf31ecc7e414ab29d49576ae
To Reproduce
Steps to reproduce the behavior:
Observe missing elements:
![image](https://user-images.githubusercontent.com/838783/191995306-78441cf7-fd5f-450b-9588-b9157cab7e4c.png)
Expected behavior
![image](https://user-images.githubusercontent.com/838783/191995849-77ba0dbd-22f3-4c6e-a457-a180cbd5b391.png)
No elements to be missing:
Desktop (please complete the following information):
Code issue
You cannot just do a basic string comparison on hyperlink references. This will never work how its implementor intended.
Direct
git blame
is to:svgo/plugins/cleanupIDs.js
Line 16 in a9834ef
By @TrySound.
However this bug dates back to original implementation of the plugin, making it ten years old. 40ab776 by @deepsweet.
The text was updated successfully, but these errors were encountered: