Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
<code>
<a href="{{ test_url }}">something</a>
</code>
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | 2884719-4-pathologic.patch | 660 bytes | eojthebrave |
#3 | 2884719-3-pathologic-regex-update.patch | 670 bytes | eojthebrave |
|
Comments
Comment #2
eojthebraveComment #3
eojthebraveThe attached patch updates the regular expression used to locate attributes that the pathologic filter should be run on so that it skips all the text inside of a
code
block.Consider the following inside a code block.
Before regex update:
After update:
Comment #4
eojthebraveUpdate for latest version of the module.