Conversation
ellmetha
left a comment
There was a problem hiding this comment.
Thanks for providing this! I think the PR is breaking existing behaviors in its current state, so we may need to fix that in order to be able to proceed and merge it. I also think that we should add new unit tests to verify the that tag is working as expected for relative URLs. 🙂
| rendered = '[url={}]{}[/url]'.format(href, value) if option else \ | ||
| '[url]{}[/url]'.format(value) |
There was a problem hiding this comment.
Why remove this logic? This is going to introduce a change in behavior and I don't think this is necessary in order to allow relative URLs.
There was a problem hiding this comment.
¯\_(ツ)_/¯
Just felt this way.
I believe you're right, let's not change it too too much.
|
Updated |
|
Also replaced http:// with https:// because year is 2023 |
| for xss in bbcode_settings.URL_XSS_FILTER: | ||
| if xss in url: | ||
| return url |
There was a problem hiding this comment.
This logic is duplicated in three places. Could we define it in a shared method to avoid the duplication (eg. in core/utils)?
Fixes #45