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

rgb()/rgba() CSS color values not supported in filterCssValue #49

Open
oujesky opened this issue Jul 13, 2015 · 0 comments
Open

rgb()/rgba() CSS color values not supported in filterCssValue #49

oujesky opened this issue Jul 13, 2015 · 0 comments

Comments

@oujesky
Copy link

oujesky commented Jul 13, 2015

I am running into following error when using rgb(...) or rgba(...) in CSS color values with strict autoescaping.

Uncaught AssertionError: Failure: Bad value rgba(0,0,0,0.6) for |filterCssValue

Testing template:

{namespace test}

{template .item}
    {@param? style: [color: string]}

    <div style="{call .style}{param style: $style /}{/call}">
        test
    </div>
{/template}

{template .style private="true" kind="css"}
    {@param? style: [color: string]}

    {if $style.color}background-color: {$style.color};{/if}
{/template}

To reproduce, it can be called with following JS code:

test.item({
    style = {
        color: 'rgba(0, 0, 0, 0.6)'
    }
}); 

The culprit seems to be this regular expression and in turn this generated JS code.

I can supply PR if interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant