Skip to content

Prevent Error 500s with invalid relative links

Stan Hu requested to merge sh-fix-issue-52009 into master

I've had a hard time replicating this problem by putting in the raw note string, but if I save note_html directly with this content:

<p dir=\"auto\">(Let's see if this crashes... <a class=\"no-attachment-icon\" href=\"/uploads/d18213acd3732630991986120e167e3d/Landscape_8.jpg%20%20%0ABut%20here's%20some%20more%20unexpected%20text%20:smile:\" target=\"_blank\" rel=\"noopener noreferrer\"><img src=\"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" alt=\"Landscape_8\" class=\"lazy\" data-src=\"/uploads/d18213acd3732630991986120e167e3d/Landscape_8.jpg%20%20%0ABut%20here's%20some%20more%20unexpected%20text%20:smile:\"></a></p>

I see the problem described in #52009 (closed).

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52009

Edited by Stan Hu

Merge request reports