RE: stripping characters for meta description
For meta tags I just use a simple replace list to strip the quotes. I use the list so I can replace the standard quotes and those left and right smart quotes from word. I'm assuming you're doing this because your meta description is getting truncated when it hits the first in-line quote. The HTML thinks that's the end of the string, yes? Robert Harrison Director of Interactive Services Austin & Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austin_ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358646 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: stripping characters for meta description
Here try this. Its from one of my long used validation methods. It removes all punctuation and control type characters. REReplaceNoCase(arguments.string,'([[:cntrl:]]|[[:punct:]])','','All') Wil Genovese Sr. Web Application Developer/ Systems Administrator CF Webtools www.cfwebtools.com wilg...@trunkful.com www.trunkful.com On May 13, 2014, at 11:36 AM, Matthew Smith wrote: > > I want to remove anything not number and letters to be sure that it does > not cause an issue with the search engines properly indexing the meta tags. > Thank you for the help! > > > On Tue, May 13, 2014 at 11:51 AM, Wil Genovese wrote: > >> >> Matthew - what is your end goal? >> >> >> Wil Genovese >> Sr. Web Application Developer/ >> Systems Administrator >> CF Webtools >> www.cfwebtools.com >> >> wilg...@trunkful.com >> www.trunkful.com >> >> On May 13, 2014, at 10:47 AM, DURETTE, STEVEN J wrote: >> >>> >>> Actually with the ^ I thought he told it to remove anything not in >> 0-9A-Za-z >>> >>> Steve >>> >>> >>> -Original Message- >>> From: Russ Michaels [mailto:r...@michaels.me.uk] >>> Sent: Tuesday, May 13, 2014 11:34 AM >>> To: cf-talk >>> Subject: Re: stripping characters for meta description >>> >>> >>> you haven't told it to remove quotes, you have only told it to remove >>> 0-9A-Za-z >>> >>> If you want quotes removed also then you need to include that in your >> regex >>> >>> >>> On Tue, May 13, 2014 at 4:26 PM, Matthew Smith >> wrote: >>> >>>> >>>> I have this: >>>> >>> REReplace(request.page.description,"[^0-9A-Za-z ]","","all")> >>>> >>>> yes I am still getting quotes in the description. >>>> >>>> >>>> >>>> >> http://www.theartoflovingcatsanddogs.com/art-item/pueblo-kitties-coffee-cup-286/index.cfm >>>> >>>> >>>> >>> >>> >>> >>> >> >> > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358643 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: stripping characters for meta description
I want to remove anything not number and letters to be sure that it does not cause an issue with the search engines properly indexing the meta tags. Thank you for the help! On Tue, May 13, 2014 at 11:51 AM, Wil Genovese wrote: > > Matthew - what is your end goal? > > > Wil Genovese > Sr. Web Application Developer/ > Systems Administrator > CF Webtools > www.cfwebtools.com > > wilg...@trunkful.com > www.trunkful.com > > On May 13, 2014, at 10:47 AM, DURETTE, STEVEN J wrote: > > > > > Actually with the ^ I thought he told it to remove anything not in > 0-9A-Za-z > > > > Steve > > > > > > -Original Message- > > From: Russ Michaels [mailto:r...@michaels.me.uk] > > Sent: Tuesday, May 13, 2014 11:34 AM > > To: cf-talk > > Subject: Re: stripping characters for meta description > > > > > > you haven't told it to remove quotes, you have only told it to remove > > 0-9A-Za-z > > > > If you want quotes removed also then you need to include that in your > regex > > > > > > On Tue, May 13, 2014 at 4:26 PM, Matthew Smith >wrote: > > > >> > >> I have this: > >> >> REReplace(request.page.description,"[^0-9A-Za-z ]","","all")> > >> > >> yes I am still getting quotes in the description. > >> > >> > >> > >> > http://www.theartoflovingcatsanddogs.com/art-item/pueblo-kitties-coffee-cup-286/index.cfm > >> > >> > >> > > > > > > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358639 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: stripping characters for meta description
sorry, didn;t read it properly :-) On Tue, May 13, 2014 at 4:47 PM, DURETTE, STEVEN J wrote: > > Actually with the ^ I thought he told it to remove anything not in > 0-9A-Za-z > > Steve > > > -Original Message- > From: Russ Michaels [mailto:r...@michaels.me.uk] > Sent: Tuesday, May 13, 2014 11:34 AM > To: cf-talk > Subject: Re: stripping characters for meta description > > > you haven't told it to remove quotes, you have only told it to remove > 0-9A-Za-z > > If you want quotes removed also then you need to include that in your regex > > > On Tue, May 13, 2014 at 4:26 PM, Matthew Smith >wrote: > > > > > I have this: > > > REReplace(request.page.description,"[^0-9A-Za-z ]","","all")> > > > > yes I am still getting quotes in the description. > > > > > > > > > http://www.theartoflovingcatsanddogs.com/art-item/pueblo-kitties-coffee-cup-286/index.cfm > > > > > > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358637 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: stripping characters for meta description
You are also getting exclamation points, colons, and periods. The code that you have posted should replace anything that is not a letter, number or space (though I would use \s for a space, as it is more readable). Are you sure that you are not outputting the original text, not the modified version? On Tue, May 13, 2014 at 11:26 AM, Matthew Smith wrote: > > I have this: > REReplace(request.page.description,"[^0-9A-Za-z ]","","all")> > > yes I am still getting quotes in the description. > > > > http://www.theartoflovingcatsanddogs.com/art-item/pueblo-kitties-coffee-cup-286/index.cfm > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358636 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: stripping characters for meta description
Matthew - what is your end goal? Wil Genovese Sr. Web Application Developer/ Systems Administrator CF Webtools www.cfwebtools.com wilg...@trunkful.com www.trunkful.com On May 13, 2014, at 10:47 AM, DURETTE, STEVEN J wrote: > > Actually with the ^ I thought he told it to remove anything not in 0-9A-Za-z > > Steve > > > -Original Message- > From: Russ Michaels [mailto:r...@michaels.me.uk] > Sent: Tuesday, May 13, 2014 11:34 AM > To: cf-talk > Subject: Re: stripping characters for meta description > > > you haven't told it to remove quotes, you have only told it to remove > 0-9A-Za-z > > If you want quotes removed also then you need to include that in your regex > > > On Tue, May 13, 2014 at 4:26 PM, Matthew Smith wrote: > >> >> I have this: >> > REReplace(request.page.description,"[^0-9A-Za-z ]","","all")> >> >> yes I am still getting quotes in the description. >> >> >> >> http://www.theartoflovingcatsanddogs.com/art-item/pueblo-kitties-coffee-cup-286/index.cfm >> >> >> > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358633 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: stripping characters for meta description
Actually with the ^ I thought he told it to remove anything not in 0-9A-Za-z Steve -Original Message- From: Russ Michaels [mailto:r...@michaels.me.uk] Sent: Tuesday, May 13, 2014 11:34 AM To: cf-talk Subject: Re: stripping characters for meta description you haven't told it to remove quotes, you have only told it to remove 0-9A-Za-z If you want quotes removed also then you need to include that in your regex On Tue, May 13, 2014 at 4:26 PM, Matthew Smith wrote: > > I have this: > REReplace(request.page.description,"[^0-9A-Za-z ]","","all")> > > yes I am still getting quotes in the description. > > > > http://www.theartoflovingcatsanddogs.com/art-item/pueblo-kitties-coffee-cup-286/index.cfm > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358632 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: stripping characters for meta description
you haven't told it to remove quotes, you have only told it to remove 0-9A-Za-z If you want quotes removed also then you need to include that in your regex On Tue, May 13, 2014 at 4:26 PM, Matthew Smith wrote: > > I have this: > REReplace(request.page.description,"[^0-9A-Za-z ]","","all")> > > yes I am still getting quotes in the description. > > > > http://www.theartoflovingcatsanddogs.com/art-item/pueblo-kitties-coffee-cup-286/index.cfm > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358629 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
stripping characters for meta description
I have this: yes I am still getting quotes in the description. http://www.theartoflovingcatsanddogs.com/art-item/pueblo-kitties-coffee-cup-286/index.cfm ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358627 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm