SMF
SMF copied to clipboard
IURL anchor links force url
Description
When you use iurl to link to a anchor bbc in a post, it incorrectly will force the entire url into the post.
Steps to reproduce
- Create new post.
- Use contents:
[iurl="#db_query"]$smcFunc['db_query'][/iurl]
TEST
[anchor=db_query]$smcFunc['db_query'] (identifier, query, values, connection)[/anchor]
- Post the message
- Edit the message
- Results show the iurl now contains $scripturl=action=post.....#anchor]
Environment (complete as necessary)
- Version/Git revision: latest
- Database Type: N/a
- Database Version: N/a
- PHP Version: PHP 8.1 and PHP 8.2
Additional information/references
Noticed on sm.org and confirmed in my dev env.
Seems to be because we pass it through encodeURI()
Possible side effect seen here? https://www.simplemachines.org/community/index.php?topic=583430.0