Home > Net >  For help: the.net core in MVC, the input of single quotation marks are escaped.
For help: the.net core in MVC, the input of single quotation marks are escaped.

Time:09-30

I think through the Razor page @ Model output string, placed in js segment, as follows:
ColNames: [@ string. Join (", "Model. ShowColumns. Select (t=& gt;" '" + tc olumnName. ToCamel () + "' "). The ToArray ()))
The output to the script for the page:
ColNames: [& amp; # 39; x27 fonds& # 39; x27, & amp; # x27; ajdh& # x27;, & amp; # x27; gzsx& # x27;] ,
What I want effect for:
ColNames: [' fonds', 'ajdh', 'GZSX],
It is obvious that single quotes are escaped to & amp; # x27; Please think, this is not,

CodePudding user response:

HTML. Raw ()
  • Related