Wrox Programmer Forums
|
BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950
This is the forum to discuss the Wrox book ASP.NET MVC Website Programming Problem Design Solution by Nicholas Berardi, Al Katawazi, and Marco Bellinaso; ISBN: 9780470410950
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 22nd, 2009, 05:06 PM
Friend of Wrox
Points: 546, Level: 8
Points: 546, Level: 8 Points: 546, Level: 8 Points: 546, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2009
Posts: 105
Thanks: 3
Thanked 20 Times in 19 Posts
Default HTML content editor and HTML.Encode()

So, TinyMCE, an HTML editor, is used for many of the fields, such as the article body. But, the article body is displayed with HTML.Encode() meaning the HTML tags are displayed rather than rendered. Does anyone else see an issue with that?

Yes Nick, I know I can choose to not use encode, what is more interesting is finding why you did?



Steve
 
Old September 22nd, 2009, 05:51 PM
nberardi's Avatar
Wrox Author
 
Join Date: Aug 2008
Posts: 102
Thanks: 1
Thanked 16 Times in 16 Posts
Send a message via AIM to nberardi
Default

Are you trying to catch me in a trap or a lie or something? Calling me out by name right off on the first pos is a little rude. If you look in the book and not the downloadable sample you will see that it is not encoded. Before the release and after the code was written in the book we went though and wrapped Html.Encode() around stuff, we were a little over zealous in some parts. And we have since corrected that with the lastest code check-ins.
__________________
Check out my blog at: http://www.coderjournal.com

Last edited by nberardi; September 22nd, 2009 at 05:53 PM..
The Following User Says Thank You to nberardi For This Useful Post:
Lee Dumond (September 25th, 2009)
 
Old September 24th, 2009, 07:40 PM
Friend of Wrox
Points: 546, Level: 8
Points: 546, Level: 8 Points: 546, Level: 8 Points: 546, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2009
Posts: 105
Thanks: 3
Thanked 20 Times in 19 Posts
Default

No Nick, not trying to catch you in a lie at all, just curious about the Why of using an HTML editor, that will emit HTML, then display that using the HTML.Encode() that won't render the HTML. The overzealous application of Encode() was a sufficient explanation. I look forward to your explanations on the other things I'm finding.

Steve





Similar Threads
Thread Thread Starter Forum Replies Last Post
Html encode zondre BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 1 July 23rd, 2009 05:12 PM
html editor MunishBhatia ASP.NET 2.0 Basics 1 February 5th, 2008 12:15 AM
Disappearing HTML in Editor Ron Howerton VS.NET 2002/2003 5 June 1st, 2006 06:27 AM
html editor sumi Javascript How-To 5 December 22nd, 2003 09:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.