You are developing a controller for an ASP.NET MVC application that manages message board postings.
The security protection built in to ASP.NET is preventing users from saving their HTML.
You need to enable users to edit and save their HTML while maintaining existing security protection measures. Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer is 100% D, not B. With B answer, we obtain the opposite preventing the user from saving his HTML
If the “[ValidateInput(false)]” was on the controller then html will be allowed to all methods in the controller which may not be desirable.
The value of having “[ValidateInput(false)]” to dress the controller method is not only to allow html in the method but also to maintain existing security measures.
correct answer: D
Answer should be “D” and not “B”