Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Trying to write addTagHelper with quotes crashes Visual Studio #1242

Closed
NTaylorMullen opened this issue Apr 19, 2017 · 2 comments
Closed

Trying to write addTagHelper with quotes crashes Visual Studio #1242

NTaylorMullen opened this issue Apr 19, 2017 · 2 comments

Comments

@NTaylorMullen
Copy link
Member

If you try and write this out character by character: @addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" you wont get to the end of the line, VS will crash.

Thissss is pretty bad 馃槃

/cc @alexgav we should probably add an end-to-end VS test for this.

@NTaylorMullen
Copy link
Member Author

This is on the runtime side. We have a faulty check in our TagHelper binder: https://github.com/aspnet/Razor/blob/dev/src/Microsoft.AspNetCore.Razor.Language/TagHelperBinderSyntaxTreePass.cs#L351

NTaylorMullen added a commit that referenced this issue Apr 20, 2017
- Prior to this change we'd try to substring a TagHelper directive with length 1 but our substring call would be for -1 (explosions).
- Added tests to validate that `@tagHelperPrefix`, `@removeTagHelper` and `@addTagHelper` all behave properly when they have malformed quotes.

#1242
NTaylorMullen added a commit that referenced this issue Apr 20, 2017
- Prior to this change we'd try to substring a TagHelper directive with length 1 but our substring call would be for -1 (explosions).
- Added tests to validate that `@tagHelperPrefix`, `@removeTagHelper` and `@addTagHelper` all behave properly when they have malformed quotes.

#1242
@NTaylorMullen
Copy link
Member Author

f31b45d

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

No branches or pull requests

1 participant