News content modules are often rendered using some plug-ins.
Therefore, there is access to the label content.
The following notes are required for payment.
1, the key content.
Since the rendered content has many special symbols, generic commits, it will be blocked, and error.
There are two ways to handle this: coding and reducing security.
Encode the content, then store it, and decode it when it is removed, very slowly.
Because the news content is more, and the background operation, has the account authority control, the security is very high, therefore recommends reduces the security.
C#:[validateinput (false)].
or web:<pages validaterequest= "false"/>
2, special characters.
Because with some special characters, you need to set the database type. Special characters can be stored.
Text, for example.
3, display.
You cannot assign values directly to the display, you need to use the way you insert HTML fragments.
C #: @MvcHtmlString. Create (model.contents)
js:$ ("#contents"). HTML (content);
Copyright notice: This article blog original article. Blogs, without consent, may not be reproduced.
Experience 38--news content Processing