When pasting a link with special Characters it will add escape characters, crippling the link

Hello,

I know I could do so much more to adequately tell the right developer exactly what happened to me the last few days/weeks when reading my newspaper and trying to copy links I find interesting to my private forum, to keep track of what I was reading.

All of a sudden I get ERROR 400 from the servers of the Newspapers, that disrupt my reading / posting system.

After cooling down and reproducing the steps needed to get to this point I concluded it has to be a bug in how Discourse parses links pasted to the editor when using Chrome.

This would be a link I want to keep track of just by pasting it in a topic:

https://www.destentor.nl/home/moeilijke-combinatie-hulpverlener-beschermen-en-psychotische-dader-straffen~a9297efa/

When pasting it in my Discourse it pastes this however:

You see how it adds the backslash here? I think it has something to do with string escaping and parsing the ~ in this case. Please fix your regex :wink:

Sorry, just a user here - can’t edit/upload this code myself yet without breaking stuff so letting you do it.

1 Like

You would only ‘see’ the error, after clicking the invalid link and editting the post to see what is being linked ofc.

Did you try here or on try.discourse.org?

There was a recent fix related to links after the report in Pasted URLs in Rich Text Editor improperly escape tilde character

1 Like

Oh wow! This was done yesterday. I’m updating the latest 52 edits as we speak! Will let you know if it has been fixed already. :check_box_with_check: FIXED
Wow. Thanks, this indeed seems to be the exact same thing I am posting about.
You may ‘lock’ this topic. Thanks!

2 Likes