Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

CSS sanitizing drops style following an extra semi-colon #1993

Open
ziftytodd opened this issue Feb 2, 2016 · 1 comment · May be fixed by #2023
Open

CSS sanitizing drops style following an extra semi-colon #1993

ziftytodd opened this issue Feb 2, 2016 · 1 comment · May be fixed by #2023

Comments

@ziftytodd
Copy link

When sanitizing CSS, if you give it this string of CSS
color:#292f33;;font-size:28px;padding:0px;

The result will be
color:#292f33 ; padding:0px ;

Which is missing the font-size style entirely. However, if the extra semi-colon after the color style is removed, then font-size is preserved.

@Slayer95
Copy link
Contributor

Slayer95 commented Aug 2, 2017

Simple reproduction:

let called = false;
parseCssDeclarations(';margin:auto', {
  declaration: () => called = true,
});
called; // Still false

@Slayer95 Slayer95 linked a pull request Aug 2, 2017 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants