Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't process data URLs #309

Open
nex3 opened this issue Nov 16, 2022 · 0 comments
Open

Don't process data URLs #309

nex3 opened this issue Nov 16, 2022 · 0 comments

Comments

@nex3
Copy link

nex3 commented Nov 16, 2022

Currently if you enable the processUrls option, RTLCSS will apply its string map even to data: URLs. This will typically corrupt the URL contents, especially for base64-encoded URLs (which contain the text ltr or rtl reasonably often). Here's an example:

/*rtl:options:{
  "stringMap": [
    {
      "name"    : "ltr-rtl",
      "priority": 100,
      "search"  : ["ltr"],
      "replace" : ["rtl"],
      "options" :	{
          "scope" : "url",
          "ignoreCase" : true
        }
    }
  ],
  "processUrls": true
}*/
.example {
   background: url(data:image/svg+xml;base64,ltr)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants