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

Avoid adding CSS scope to elements in HEAD #32709

Merged
merged 3 commits into from
May 17, 2021

Conversation

captainsafia
Copy link
Member

Fixes part of #32542.

@ghost ghost added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label May 14, 2021
@captainsafia captainsafia marked this pull request as ready for review May 15, 2021 01:24
Comment on lines 71 to 78
var isInvalidTag = content.Contains("head")
|| content.Contains("meta")
|| content.Contains("title")
|| content.Contains("link")
|| content.Contains("base")
|| content.Contains("script")
|| content.Contains("style")
|| content.Contains("html");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe these should be StringComparison.OrdinalIgnoreCase

Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Just a small touch up! I like that we didn't try something more complicated. Something like this is perfect since it will work most of the time.

@captainsafia captainsafia enabled auto-merge (squash) May 15, 2021 18:18
@captainsafia captainsafia merged commit fdabaf0 into main May 17, 2021
@captainsafia captainsafia deleted the safia/fix-css-scope-application branch May 17, 2021 07:40
@ghost ghost added this to the 6.0-preview5 milestone May 17, 2021
dougbu pushed a commit to dougbu/razor-compiler that referenced this pull request Nov 17, 2021
* Avoid adding CSS scope to elements in HEAD
* Set StringComparison type for comparison

Commit migrated from dotnet/aspnetcore@fdabaf00a672
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants