0

I have a <textarea> to write the HTML content of my application:

this is how I wrote it and before I press the Save button

enter image description here

and this is after I pressed save :/

enter image description here

How do I avoid this automatic injection?

Note that does not saves to the field on the first time, but it adds to the input automatically and I can't get ride of it :/

a bigger template, and if the user simply press SAVE it will sve with VS code on it :(

balexandre
  • 73,608
  • 45
  • 233
  • 342
  • It's probably being injected when the content is fetched from the server, rather than injected into the input itself. Perhaps on Save, does the textarea refetch content from the server process? What type of web application is it? ASP.NET Core, or ASP.NET 4.x? – Joe Davis May 26 '16 at 17:55
  • @JoeDavis it's injected into the input, and if I don't delete it and press SAVE, it will save that content and the next refresh will show twice... it is a custom WebForms, where we do all the code into a `StringBuilder` and output the `.ToString()` as a body content. – balexandre May 27 '16 at 06:18

1 Answers1

0

The content must be passing through the HttpResponse.Filter, since that's the only place that Browser Link injects scripts in a WebForms application.

You can suppress this by changing the HttpResponse.ContentType of your WebForm to something other than text/html. text/xhtml or text/plain will work.

Or there's always the nuclear option: Disable Browser Link for the entire site with

<appSettings>
    <add key="vs:EnableBrowserLink" value="false" />
</appSettings>
Joe Davis
  • 792
  • 5
  • 8