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

"URI malformed" error with dynamic file references #170

Closed
tjramage opened this issue Nov 9, 2015 · 3 comments
Closed

"URI malformed" error with dynamic file references #170

tjramage opened this issue Nov 9, 2015 · 3 comments

Comments

@tjramage
Copy link

tjramage commented Nov 9, 2015

<img src="<%= Document.GetValue("ImageFileName") %>" alt="<%= Document.GetValue("ImageAltText") %>" />

We have a .NET CMS, and it's quite common to use dynamically generated file references, such as the example above. I get a "URI malformed" error because obviously it can't handle the <%= ... expression. Is there any way to set an ignore pattern so we can detect dynamic file references and skip over them?

@benhoIIand
Copy link
Owner

You can add a string/regex in the ignorePatterns option, i.e.

{
    ignorePatterns: ['<%']
}

@uzquiano
Copy link

Just a note here, in 0.6.1 I got this working by using the escaped value, i.e.

{
    ignorePatterns: ['%3C%']
}

Not sure if the reason was because of some of our own post-processing or because of grunt-cache-bust, but perhaps this will help someone.

Great job on this Grunt task! We are really thankful for all of your hard work.

@benhoIIand
Copy link
Owner

Thanks for checking this. I'd recommend trying out the feature/v1.0.0-beta branch and have a read through #147 - things will get a lot easier in the next version.

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

3 participants