Fix diff of requirements.txt file by not matching newlines as part of package names

Douwe Maan requested to merge dm-dependency-linker-newlines into master


The cause of the problem was that each newline that followed a package name would have an <a> tag around it in the blob content, which meant that when splitting the blob content up into lines, some lines would end in the opening <a> tag, and others would start in the closing </a> tag. When then rendering each line in its own <td> for the diff, the <td> would hold invalid content (half an <a> tag).

Note that there is no XSS issue here: the displayed HTML is all GitLab generated.





Merge request reports