Thread: [Blogcfc-develop] OT: Storing HTML
Brought to you by:
cfjedimaster
|
From: Ben F. <bf...@ma...> - 2003-08-07 15:08:57
|
Hey all, I need a quick reality check here ... do you store complete HTML (with tags and formatting) in your tblBlogEntries table, or do you store just text, or do you store embedded tokens which you use to render output properly? Or something else altogether? My gut feel is that storing <P> and <FONT> and whatever in the core record is a bad thing. But what about tag markers, do you store <CFSET> or <CFSET>? And what about titles? Embedding < seems to mess up some RSS displays (but not all). I have been storing <CFSET> in my content (and use HTMLEditFormat() to display it properly), that works well but messes up some RSS feeds it seems. I have not been storing any formatting at all, so to crate links I save the URL and have a UDF that turns it into a link at presentation time. That works for links but not, for example, for embedding a code snippet. Anyone have any strong feelings on this one? --- Ben ====================================================== Ben Forta - Macromedia Inc. E-Mail: bf...@ma... Phone: (248)213-0203 Fax: (248)213-0299 Macromedia: http://www.macromedia.com/ Personal: http://www.forta.com/ Blog: http://www.forta.com/blog/ Have questions about ColdFusion? You need the ColdFusion FAQ (now in twelve languages) at http://www.cffaq.com/ - browse, learn, link, comment, and contribute. |
|
From: Raymond C. <jed...@mi...> - 2003-08-07 15:58:37
|
I typically 'trust' all data for get entries. I'll escape code I want to show up though. So, an entry could look like so: This code <b>ROCKS!</b> <cfset x = 1><br> Etc Code is NOT fun to put in. I'm thinking of just making a quick and dirty converter in Studio so I can paste from there. ======================================================================== === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email : jed...@mi... Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: blo...@li... > [mailto:blo...@li...] On > Behalf Of Ben Forta > Sent: Thursday, August 07, 2003 9:08 AM > To: blo...@li... > Subject: [Blogcfc-develop] OT: Storing HTML > > > Hey all, > > I need a quick reality check here ... do you store complete > HTML (with tags and formatting) in your tblBlogEntries table, > or do you store just text, or do you store embedded tokens > which you use to render output properly? Or something else altogether? > > My gut feel is that storing <P> and <FONT> and whatever in > the core record is a bad thing. But what about tag markers, > do you store <CFSET> or <CFSET>? > > And what about titles? Embedding < seems to mess up some > RSS displays (but not all). > > I have been storing <CFSET> in my content (and use > HTMLEditFormat() to display it properly), that works well but > messes up some RSS feeds it seems. I have not been storing > any formatting at all, so to crate links I save the URL and > have a UDF that turns it into a link at presentation time. > That works for links but not, for example, for embedding a > code snippet. > > Anyone have any strong feelings on this one? > > --- Ben > > ====================================================== > Ben Forta - Macromedia Inc. > E-Mail: bf...@ma... > Phone: (248)213-0203 > Fax: (248)213-0299 > Macromedia: http://www.macromedia.com/ > Personal: http://www.forta.com/ > Blog: http://www.forta.com/blog/ > > Have questions about ColdFusion? You need the ColdFusion FAQ > (now in twelve languages) at http://www.cffaq.com/ - browse, > learn, link, comment, and contribute. > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites > including Data Reports, E-commerce, Portals, and Forums are > available now. Download today and enter to win an XBOX or > Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet _072303_01/01 _______________________________________________ Blogcfc-develop mailing list Blo...@li... https://lists.sourceforge.net/lists/listinfo/blogcfc-develop |
|
From: Ben F. <bf...@ma...> - 2003-08-07 16:12:58
|
Fair enough. But, doesn't that screw up RSS feeds and how others present the data? -----Original Message----- From: blo...@li... [mailto:blo...@li...] On Behalf Of Raymond Camden Sent: Thursday, August 07, 2003 11:58 AM To: blo...@li... Subject: RE: [Blogcfc-develop] OT: Storing HTML I typically 'trust' all data for get entries. I'll escape code I want to show up though. So, an entry could look like so: This code <b>ROCKS!</b> <cfset x = 1><br> Etc Code is NOT fun to put in. I'm thinking of just making a quick and dirty converter in Studio so I can paste from there. ======================================================================== === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email : jed...@mi... Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: blo...@li... > [mailto:blo...@li...] On > Behalf Of Ben Forta > Sent: Thursday, August 07, 2003 9:08 AM > To: blo...@li... > Subject: [Blogcfc-develop] OT: Storing HTML > > > Hey all, > > I need a quick reality check here ... do you store complete > HTML (with tags and formatting) in your tblBlogEntries table, > or do you store just text, or do you store embedded tokens > which you use to render output properly? Or something else altogether? > > My gut feel is that storing <P> and <FONT> and whatever in > the core record is a bad thing. But what about tag markers, > do you store <CFSET> or <CFSET>? > > And what about titles? Embedding < seems to mess up some > RSS displays (but not all). > > I have been storing <CFSET> in my content (and use > HTMLEditFormat() to display it properly), that works well but > messes up some RSS feeds it seems. I have not been storing > any formatting at all, so to crate links I save the URL and > have a UDF that turns it into a link at presentation time. > That works for links but not, for example, for embedding a > code snippet. > > Anyone have any strong feelings on this one? > > --- Ben > > ====================================================== > Ben Forta - Macromedia Inc. > E-Mail: bf...@ma... > Phone: (248)213-0203 > Fax: (248)213-0299 > Macromedia: http://www.macromedia.com/ > Personal: http://www.forta.com/ > Blog: http://www.forta.com/blog/ > > Have questions about ColdFusion? You need the ColdFusion FAQ > (now in twelve languages) at http://www.cffaq.com/ - browse, > learn, link, comment, and contribute. > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites > including Data Reports, E-commerce, Portals, and Forums are > available now. Download today and enter to win an XBOX or > Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet _072303_01/01 _______________________________________________ Blogcfc-develop mailing list Blo...@li... https://lists.sourceforge.net/lists/listinfo/blogcfc-develop ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01 /01 _______________________________________________ Blogcfc-develop mailing list Blo...@li... https://lists.sourceforge.net/lists/listinfo/blogcfc-develop |
|
From: Raymond C. <jed...@mi...> - 2003-08-07 16:33:00
|
The RSS feed uses xmlFormat() around the string. In theory, that makes everything safe. I know I've tested my feed w/ a verification service and it was ok. ======================================================================== === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email : jed...@mi... Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: blo...@li... > [mailto:blo...@li...] On > Behalf Of Ben Forta > Sent: Thursday, August 07, 2003 10:04 AM > To: blo...@li... > Subject: RE: [Blogcfc-develop] OT: Storing HTML > > > Fair enough. But, doesn't that screw up RSS feeds and how > others present the data? > > > > > -----Original Message----- > From: blo...@li... > [mailto:blo...@li...] On > Behalf Of Raymond Camden > Sent: Thursday, August 07, 2003 11:58 AM > To: blo...@li... > Subject: RE: [Blogcfc-develop] OT: Storing HTML > > > I typically 'trust' all data for get entries. I'll escape > code I want to show up though. So, an entry could look like so: > > This code <b>ROCKS!</b> > > <cfset x = 1><br> > Etc > > Code is NOT fun to put in. I'm thinking of just making a > quick and dirty converter in Studio so I can paste from there. > > ============================================================== > ========== > === > Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc > (www.mindseye.com) > Member of Team Macromedia > (http://www.macromedia.com/go/teammacromedia) > > Email : jed...@mi... > Blog : www.camdenfamily.com/morpheus/blog > Yahoo IM : morpheus > > "My ally is the Force, and a powerful ally it is." - Yoda > > > -----Original Message----- > > From: blo...@li... > > [mailto:blo...@li...] On > > Behalf Of Ben Forta > > Sent: Thursday, August 07, 2003 9:08 AM > > To: blo...@li... > > Subject: [Blogcfc-develop] OT: Storing HTML > > > > > > Hey all, > > > > I need a quick reality check here ... do you store complete > HTML (with > > tags and formatting) in your tblBlogEntries table, or do you store > > just text, or do you store embedded tokens which you use to render > > output properly? Or something else altogether? > > > > My gut feel is that storing <P> and <FONT> and whatever in the core > > record is a bad thing. But what about tag markers, do you store > > <CFSET> or <CFSET>? > > > > And what about titles? Embedding < seems to mess up some RSS > > displays (but not all). > > > > I have been storing <CFSET> in my content (and use > > HTMLEditFormat() to display it properly), that works well but > > messes up some RSS feeds it seems. I have not been storing > > any formatting at all, so to crate links I save the URL and > > have a UDF that turns it into a link at presentation time. > > That works for links but not, for example, for embedding a > > code snippet. > > > > Anyone have any strong feelings on this one? > > > > --- Ben > > > > ====================================================== > > Ben Forta - Macromedia Inc. > > E-Mail: bf...@ma... > > Phone: (248)213-0203 > > Fax: (248)213-0299 > > Macromedia: http://www.macromedia.com/ > > Personal: http://www.forta.com/ > > Blog: http://www.forta.com/blog/ > > > > Have questions about ColdFusion? You need the ColdFusion > FAQ (now in > > twelve languages) at http://www.cffaq.com/ - browse, learn, link, > > comment, and contribute. > > > > > > > > ------------------------------------------------------- > > This SF.Net email sponsored by: Free pre-built ASP.NET > sites including > > Data Reports, E-commerce, Portals, and Forums are available now. > > Download today and enter to win an XBOX or Visual Studio .NET. > > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet > _072303_01/01 > _______________________________________________ > Blogcfc-develop mailing list Blo...@li... > https://lists.sourceforge.net/lists/listinfo/blogcfc-develop > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites > including Data Reports, E-commerce, Portals, and Forums are > available now. Download today and enter to win an XBOX or > Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet _072303_01 /01 _______________________________________________ Blogcfc-develop mailing list Blo...@li... https://lists.sourceforge.net/lists/listinfo/blogcfc-develop ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01 /01 _______________________________________________ Blogcfc-develop mailing list Blo...@li... https://lists.sourceforge.net/lists/listinfo/blogcfc-develop |
|
From: Nathan D. <na...@ch...> - 2003-08-07 16:33:08
|
It shouldn't if you make the body a CDATA field, which should be legit for RSS. I'm not sure what the benefit of storing some "marker" over storing the HTML is -- that is, you can just treat the HTML like a marker if need be. It gets really tricky if you want to do something like put an image in a blog entry (which is increasingly popular given that Radio and MT seem to let you do that easily) -- seems that storing the IMG tag with an absolute reference to the image works. Anyone know how Radio and MT store data like that? > -----Original Message----- > From: blo...@li... > [mailto:blo...@li...]On Behalf Of Ben > Forta > Sent: Thursday, August 07, 2003 9:04 AM > To: blo...@li... > Subject: RE: [Blogcfc-develop] OT: Storing HTML > > > Fair enough. But, doesn't that screw up RSS feeds and how others present > the data? > > > > > -----Original Message----- > From: blo...@li... > [mailto:blo...@li...] On Behalf Of > Raymond Camden > Sent: Thursday, August 07, 2003 11:58 AM > To: blo...@li... > Subject: RE: [Blogcfc-develop] OT: Storing HTML > > > I typically 'trust' all data for get entries. I'll escape code I want to > show up though. So, an entry could look like so: > > This code <b>ROCKS!</b> > > <cfset x = 1><br> > Etc > > Code is NOT fun to put in. I'm thinking of just making a quick and dirty > converter in Studio so I can paste from there. > |
|
From: Raymond C. <jed...@mi...> - 2003-08-07 16:37:51
|
FYI, absolute URLS seem to be standard for all links. I know when a blog entry had <a href="foo.cfm"> the verification service complained. I guess that makes sense though. ======================================================================== === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email : jed...@mi... Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: blo...@li... > [mailto:blo...@li...] On > Behalf Of Nathan Dintenfass > Sent: Thursday, August 07, 2003 10:33 AM > To: blo...@li... > Subject: RE: [Blogcfc-develop] OT: Storing HTML > > > It shouldn't if you make the body a CDATA field, which should > be legit for RSS. > > I'm not sure what the benefit of storing some "marker" over > storing the HTML is -- that is, you can just treat the HTML > like a marker if need be. > > It gets really tricky if you want to do something like put an > image in a blog entry (which is increasingly popular given > that Radio and MT seem to let you do that easily) -- seems > that storing the IMG tag with an absolute reference to the > image works. Anyone know how Radio and MT store data like that? > > > > > > -----Original Message----- > > From: blo...@li... > > [mailto:blo...@li...]On > Behalf Of Ben > > Forta > > Sent: Thursday, August 07, 2003 9:04 AM > > To: blo...@li... > > Subject: RE: [Blogcfc-develop] OT: Storing HTML > > > > > > Fair enough. But, doesn't that screw up RSS feeds and how others > > present the data? > > > > > > > > > > -----Original Message----- > > From: blo...@li... > > [mailto:blo...@li...] On Behalf Of > > Raymond Camden > > Sent: Thursday, August 07, 2003 11:58 AM > > To: blo...@li... > > Subject: RE: [Blogcfc-develop] OT: Storing HTML > > > > > > I typically 'trust' all data for get entries. I'll escape > code I want > > to show up though. So, an entry could look like so: > > > > This code <b>ROCKS!</b> > > > > <cfset x = 1><br> > > Etc > > > > Code is NOT fun to put in. I'm thinking of just making a quick and > > dirty converter in Studio so I can paste from there. > > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites > including Data Reports, E-commerce, Portals, and Forums are > available now. Download today and enter to win an XBOX or > Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet _072303_01/01 _______________________________________________ Blogcfc-develop mailing list Blo...@li... https://lists.sourceforge.net/lists/listinfo/blogcfc-develop |
|
From: Roger B. <ro...@ag...> - 2003-08-07 18:54:17
|
> Anyone know how Radio and MT store data like that? Nathan, If we're talking an inline JPEG, they just use an <img> tag. RSS 2.0 *does* support embedded, base64-encoded media objects, but almost no one uses that capability. -- Roger Benningfield JournURL community-powered weblogs & diaries work: http://journurl.com/ blog: http://admin.support.journurl.com/ |
|
From: Ben F. <bf...@ma...> - 2003-08-07 19:08:21
|
My biggest problem is that I'd like to be able to repurpose content without having to strip out HTML and reapply it again. Grrrr. --- Ben -----Original Message----- From: blo...@li... [mailto:blo...@li...] On Behalf Of Raymond Camden Sent: Thursday, August 07, 2003 11:58 AM To: blo...@li... Subject: RE: [Blogcfc-develop] OT: Storing HTML I typically 'trust' all data for get entries. I'll escape code I want to show up though. So, an entry could look like so: This code <b>ROCKS!</b> <cfset x = 1><br> Etc Code is NOT fun to put in. I'm thinking of just making a quick and dirty converter in Studio so I can paste from there. ======================================================================== === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email : jed...@mi... Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: blo...@li... > [mailto:blo...@li...] On > Behalf Of Ben Forta > Sent: Thursday, August 07, 2003 9:08 AM > To: blo...@li... > Subject: [Blogcfc-develop] OT: Storing HTML > > > Hey all, > > I need a quick reality check here ... do you store complete > HTML (with tags and formatting) in your tblBlogEntries table, > or do you store just text, or do you store embedded tokens > which you use to render output properly? Or something else altogether? > > My gut feel is that storing <P> and <FONT> and whatever in > the core record is a bad thing. But what about tag markers, > do you store <CFSET> or <CFSET>? > > And what about titles? Embedding < seems to mess up some > RSS displays (but not all). > > I have been storing <CFSET> in my content (and use > HTMLEditFormat() to display it properly), that works well but > messes up some RSS feeds it seems. I have not been storing > any formatting at all, so to crate links I save the URL and > have a UDF that turns it into a link at presentation time. > That works for links but not, for example, for embedding a > code snippet. > > Anyone have any strong feelings on this one? > > --- Ben > > ====================================================== > Ben Forta - Macromedia Inc. > E-Mail: bf...@ma... > Phone: (248)213-0203 > Fax: (248)213-0299 > Macromedia: http://www.macromedia.com/ > Personal: http://www.forta.com/ > Blog: http://www.forta.com/blog/ > > Have questions about ColdFusion? You need the ColdFusion FAQ > (now in twelve languages) at http://www.cffaq.com/ - browse, > learn, link, comment, and contribute. > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites > including Data Reports, E-commerce, Portals, and Forums are > available now. Download today and enter to win an XBOX or > Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet _072303_01/01 _______________________________________________ Blogcfc-develop mailing list Blo...@li... https://lists.sourceforge.net/lists/listinfo/blogcfc-develop ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01 /01 _______________________________________________ Blogcfc-develop mailing list Blo...@li... https://lists.sourceforge.net/lists/listinfo/blogcfc-develop |
|
From: Roger B. <ro...@ag...> - 2003-08-07 18:44:04
|
> My gut feel is that storing <P> and <FONT> and whatever > in the core record is a bad thing. But what about tag markers, > do you store <CFSET> or <CFSET>? Ben, IMO, you want to encode precisely the content that must be encoded, and nothing more. The RSS problems you've seen are the result of people (and by "people", I mean self included) encoding HTML in the <description> element rather than using [CDATA] or stripping markup entirely. Encoding it before it ever makes it into RSS raises the possibility of double-encoding, which just makes things even uglier. -- Roger Benningfield JournURL community-powered weblogs & diaries work: http://journurl.com/ blog: http://admin.support.journurl.com/ |
|
From: Ben F. <bf...@ma...> - 2003-08-07 19:12:45
|
Roger, so, would you use CFSET <CFSET> or <CFSET>? :-) -----Original Message----- From: blo...@li... [mailto:blo...@li...] On Behalf Of Roger B. Sent: Thursday, August 07, 2003 2:44 PM To: blo...@li... Subject: RE: [Blogcfc-develop] OT: Storing HTML > My gut feel is that storing <P> and <FONT> and whatever > in the core record is a bad thing. But what about tag markers, do you > store <CFSET> or <CFSET>? Ben, IMO, you want to encode precisely the content that must be encoded, and nothing more. The RSS problems you've seen are the result of people (and by "people", I mean self included) encoding HTML in the <description> element rather than using [CDATA] or stripping markup entirely. Encoding it before it ever makes it into RSS raises the possibility of double-encoding, which just makes things even uglier. -- Roger Benningfield JournURL community-powered weblogs & diaries work: http://journurl.com/ blog: http://admin.support.journurl.com/ ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01 /01 _______________________________________________ Blogcfc-develop mailing list Blo...@li... https://lists.sourceforge.net/lists/listinfo/blogcfc-develop |
|
From: Roger B. <ro...@ag...> - 2003-08-07 19:35:17
|
Ben, I leave it up to the user. If she wants <cfset> to appear as such in her blog, then she escapes it with <<cfset>> (which will result in entity encoding) or wraps it in a [code][/code] block. Everything else is left as-is. -- Roger Benningfield JournURL community-powered weblogs & diaries work: http://journurl.com/ blog: http://admin.support.journurl.com/ -----Original Message----- From: blo...@li... [mailto:blo...@li...]On Behalf Of Ben Forta Sent: Thursday, August 07, 2003 2:03 PM To: blo...@li... Subject: RE: [Blogcfc-develop] OT: Storing HTML Roger, so, would you use CFSET <CFSET> or <CFSET>? :-) |