-
Notifications
You must be signed in to change notification settings - Fork 267
Closed
Description
Basic Information
In 2.1 (but not 3.0), SCEditor mangles links for URLs that contain square brackets.
Steps to reproduce
Consider the URL https://custom.simplemachines.org/index.php?action=themes;major_smf_versions[2.1]=2.1.
- Enter a link to that URL into a post, either (a) by typing
[url]https://custom.simplemachines.org/index.php?action=themes;major_smf_versions[2.1]=2.1[/url]directly into the post text while in WYSIWYG mode, or (b) by using the editor's Insert Link button in either mode. - Click the Preview button.
- Note how the link text is mangled and the link itself points to
https://custom.simplemachines.org/index.php?action=themes;major_smf_versions[2.1], nothttps://custom.simplemachines.org/index.php?action=themes;major_smf_versions[2.1]=2.1. - If in Source mode, toggle the editor into WYSIWYG mode.
- Toggle the editor into Source mode.
- Note how the link has been rendered in BBCode as follows:
[url=https://custom.simplemachines.org/index.php?action=themes;major_smf_versions[2.1]=2.1]https://custom.simplemachines.org/index.php?action=themes;major_smf_versions[2.1]=2.1[/url]
Expected result
The preview link in step 3 should have unmangled text and should point to the correct URL.
The BBCode text in step 6 should look like this:
[url="https://custom.simplemachines.org/index.php?action=themes;major_smf_versions[2.1]=2.1"]https://custom.simplemachines.org/index.php?action=themes;major_smf_versions[2.1]=2.1[/url]
Actual result
See steps 3 and 6 in the steps to reproduce.
Version/Git revision
2.1.6
Database Engine
All
Database Version
No response
PHP Version
No response
Logs
Additional Information
The problem is that SCEditor is not wrapping the URL in quotation marks when transforming from HTML to BBCode.
Reactions are currently unavailable