Do not process attributes inside of <code> blocks

Created on 8 June 2017, over 7 years ago
Updated 12 March 2024, 10 months ago

I think that the Pathologic filter should not run when inside the context of a code block. On the Drupalize.Me site this is giving us some issues when displaying examples of Twig code.

Here is an example

// Should process href
<p>This is some <a href="/node/1">text</a></p>

// Should not process href
&#x3C;code&#x3E;
<a href="{{ test_url }}">something</a>
&#x3C;/code&#x3E;

In this case the 2nd block of text currently has the value of the href attribute updated, and it becomes a somewhat garbled and url encoded string. Making the block of code illegible.

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States eojthebrave Minneapolis, MN

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024