Microsoft Content Management Server - Smart Quotes and other problematic characters

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > November 2005 > Smart Quotes and other problematic characters





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Smart Quotes and other problematic characters
Mike

2005-11-29, 5:55 pm

I am looking for a good way to programmatically convert smart quotes and
other non ISO characters to characters that are ISO compliant. I am thinking
of writing a find and replace routine that gets called on the save event for
html placeholders. I would like to do this globally instead of updating each
template individually. Please let me know how I might be able to do this.

A collection that will give me all the place holders on a page with out
having to recurse the collections tree would help a lot and make the whole
thing more efficient.

Thanks,
Mike

Stefan [MSFT]

2005-11-29, 5:55 pm

Hi Mike,

there are two possible ways to implement this:

1) in a workflow event. Here you are able to do the action for all
placeholders globally. I would suggest to do it in the
CmsPosting_PlaceholderPropertyChanging event handler.

2) in the SavePlaceholderContent method of a custom placeholder control.
Here you could ensure that the action is only rolled out for content entered
in this specific placeholder control (if you would like to have some
granularity on this)

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------


"Mike" <Mike@discussions.microsoft.com> wrote in message
news:9032F447-5859-40E9-BF9A-3B74EE7FF482@microsoft.com...
>I am looking for a good way to programmatically convert smart quotes and
> other non ISO characters to characters that are ISO compliant. I am
> thinking
> of writing a find and replace routine that gets called on the save event
> for
> html placeholders. I would like to do this globally instead of updating
> each
> template individually. Please let me know how I might be able to do this.
>
> A collection that will give me all the place holders on a page with out
> having to recurse the collections tree would help a lot and make the whole
> thing more efficient.
>
> Thanks,
> Mike
>



Mike

2005-11-29, 5:55 pm

Thanks!

"Stefan [MSFT]" wrote:

> Hi Mike,
>
> there are two possible ways to implement this:
>
> 1) in a workflow event. Here you are able to do the action for all
> placeholders globally. I would suggest to do it in the
> CmsPosting_PlaceholderPropertyChanging event handler.
>
> 2) in the SavePlaceholderContent method of a custom placeholder control.
> Here you could ensure that the action is only rolled out for content entered
> in this specific placeholder control (if you would like to have some
> granularity on this)
>
> Cheers,
> Stefan
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> New to MCMS?
> Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
> Check out the new book as well: Advanced MCMS development:
> http://tinyurl.com/8ugwj
> ----------------------
>
>
> "Mike" <Mike@discussions.microsoft.com> wrote in message
> news:9032F447-5859-40E9-BF9A-3B74EE7FF482@microsoft.com...
>
>
>

Mike

2005-11-29, 5:55 pm

It turns out it is easier to switch the character encoding on the pages to
UTF-8 see http://www.geocities.com/stmetanat/smartquotes.htm. However, the
info about the work task events will be very useful.

Mike

"Mike" wrote:
[vbcol=seagreen]
> Thanks!
>
> "Stefan [MSFT]" wrote:
>
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com