mikitex70 / redmine_drawio

Macro plugin to embed draw.io diagrams into Redmine wiki pages
MIT License
125 stars 51 forks source link

Avoid errors with encoding characters in URL #65

Closed nanego closed 5 years ago

nanego commented 5 years ago

Hello. We have found a bug when a wiki URL contains encoded characters, like single quotes. Char codes may use lowercase or uppercase characters and it may cause problems when saving diagrams. The regex should be case-insensitive. Thanks

pageUrl = "/projects/project_slug/wiki/Plan_d%e2%80%99architecture" (window.location.pathname)
pageUrl.match("Plan_d%E2%80%99architecture"+'$') --> FALSE
pageUrl.match("Plan_d%e2%80%99architecture"+'$') --> TRUE
mikitex70 commented 5 years ago

Merged as commit 67e27ba7f8e48286301bc444e01454e3245dcb68. Thanks for your contribution.