You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a linkProtocol is specified in options, it seems to search the url using regex to determine if the url's protocol matches the linkProtocol option. However the url is not escaped, resulting in a SyntaxError if any regex special characters are present in the link.
To Reproduce
Steps to reproduce the behavior:
Go to http://suneditor.com/sample/html/options.html
Enable linkProtocol and set to anything e.g. https://
Select 'Create' to generate the editor
Open add link dialogue
Type a regex special character such as '[' in the URL to link input
Describe the bug
When a linkProtocol is specified in options, it seems to search the url using regex to determine if the url's protocol matches the linkProtocol option. However the url is not escaped, resulting in a SyntaxError if any regex special characters are present in the link.
To Reproduce
Steps to reproduce the behavior:
Go to http://suneditor.com/sample/html/options.html
Enable linkProtocol and set to anything e.g. https://
Select 'Create' to generate the editor
Open add link dialogue
Type a regex special character such as '[' in the URL to link input
Screenshots
Desktop
OS: macOS 13.5
Browser: Chrome
Version: 118.0.5993.117 (Official Build) (x86_64)
The text was updated successfully, but these errors were encountered: