Add processing for url() rules in CSS styles

Created on 14 October 2011, over 12 years ago
Updated 3 July 2023, 12 months ago

Because I have a lot of hard-coded block and node assets where properties like 'src' require strings beginning with a slash (VERY weird things happen when this rule is not followed!) I included a Pathologic config in my input formats involving just a single slash to be recognized as 'local'. This fixed hundreds of php snippets and html designs...but it DID NOT fix the following:

<table style="background: #ffffff url(/sites/default/files/images/Storybook/Pangea_StoryBook_1.jpg) no-repeat;" border="0" cellspacing="0" cellpadding="0" width="627">

But, even more curious is the fact that it DOES go ahead and do the filter trick correctly if I remove the slash in front of 'sites'! So, it is 'aware' of the need to filter this property, but it won't apply the treat-as-local rule. I could theoretically go through the site and change all these url() style refs to no slash in the first position...but there are a lot of them...is there a better way? Thanks for giving this some thought...

✨ Feature request
Status

Needs work

Version

2.0

Component

Code

Created by

🇺🇸United States MhueD

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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.69.0 2024