q2a / question2answer

Question2Answer is a free and open source platform for Q&A sites, running on PHP/MySQL.
http://www.question2answer.org/
GNU General Public License v3.0
1.63k stars 627 forks source link

A notes link is rendered unusable by prefixing it with the word "denied:" #969

Closed rumpumpel1 closed 1 year ago

rumpumpel1 commented 1 year ago

After entering a notes link like in a text field (question/answer/comment) and after saving and closing the dialog the link is prepended by the word "denied:" which renders the link unusable. A notes link is something like "notes:///xxxxxxxxxxx". See https://www.hcltechsw.com/notes. This is NOT an issue of ckeditor. The culprit is q2a/qa-inlude/vendor/htmLawed.php line 340.

pupi1985 commented 1 year ago

So you are marking a post as duplicate of another post and the URL of the original post starts with "notes:///" ?

Please, use the URL of the web page of the original post... https://yoursite.com/12345

rumpumpel1 commented 1 year ago

pupi1985: I do not understand your comment.

svivian commented 1 year ago

There are a million different schemes and we can't support them all. However you can add your own by overriding the qa_sanitize_html function using function overrides. Copy the existing function and change the 'schemes' key to something like

'schemes' => 'notes, href: aim, feed, file, ftp, gopher, http, https, irc, mailto, news, nntp, sftp, ssh, telnet; *:file, http, https; style: !; classid:clsid',