Avoid client side double linking of links in blobs
What does this MR do?
This MR fixes a regression introduced with !18305 (merged) and reported in #35120 (closed) where server side generated links in blobs (like those used in dependency files) would break as the already "linkified" (i.e. surrounded with an a
tag) links would be linkified again, ultimately breaking them (as shown here).
This MR circumvents this issue by modifying the regex used for detecting links client-side to exclude those which are part of an a
-tag. Note, that this modification isn't perfect as it only works for links where the href
attribute is on the first position of the tag. That is - currently - always the case for links generated with link_tag
in DependencyLinker::BaseLinker
. Should there be any other server-side generated links that use a different format (I am not aware of any), the detection logic would have to be extended here.
Does this MR meet the acceptance criteria?
Conformity
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Closes #35120 (closed)