Closed i-salameh95 closed 1 year ago
This is a bug of the html sanitizer. It needs rework anyway. For the time being. I'd suggest to use a Link plugin (e.g., djangocms-frontend's) and enter the phone link. This will render correctly.
@fsbraun @i-salameh95 there is also another fix - you can put TEXT_ADDITIONAL_PROTOCOLS
setting into your settings.py and add the missing protocol.
This line fixed the issue for me:
TEXT_ADDITIONAL_PROTOCOLS = ["tel"]
Though I agree this is a bug - one would expect that the default options in the text editor would all be allowed.
To verify all is working correctly, as simple test below:
from djangocms_text_ckeditor.html import clean_html
test_html = """<p>Here is a tel link <a href="tel:54423234">helo</a></p>"""
clean_html(test_html)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any thoughts on the above? Perhaps the tel protocol should be added by default?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This will now be closed due to inactivity, but feel free to reopen it.
Hello, I have noticed that adding telephone links inside djangocms-text-ckeditor is wrapping the output link: for example:
Then the outputed link appear without href at all. this happened with tel link only. djangocms-text-ckeditor version used: 5.1.1 django cms version: 3.11