08-26-05 12:53 PM
Hi Danny,
never ever use datasource.rawcontent.
See here for explanation:
http://blogs.technet.com/stefan_gos.../24/119546.aspx
Check if this solves the problem.
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
----------------------
"Danny Hille" <DannyHille@discussions.microsoft.com> wrote in message
news:5B6125F0-012C-4D6C-A4D0-2810F7C82C5B@microsoft.com...
> Hi I Have a robot (a aspx page running from a sheduled task, auth. as
> administrator)
> that replaces a all profane language (from a banned word list)
> that works ok ... except that all MCMS urls are replaced with
> ?nrmode=unpublished urls ????
>
> in short the code looks like this:
>
>
> CmsApplicationContext Cac = null;
> try
> {
> Cac =new CmsApplicationContext();
> Cac. AuthenticateAsCurrentUser(PublishingMode
.Update);
> Posting Pos = Cac.Searches.GetByGuid(pguid)as Posting;
> for(int i=0;i<Pos.Placeholders.Count;i++)
> {
> if()
> Pos.Placeholders[i].Datasource.RawContent =
> ReplaceBannedWords(Pos.Placeholders[i].Datasource.RawContent);
> }
> if(Pos.CanSubmit)Pos.Submit();
> if(Pos.CanApprove)Pos.Approve();
> Cac.CommitAll();
> }
> catch(Exception Exc)
> {
> Response.Write(Exc.ToString());
> }
> finally
> {
> if(Cac!=null)Cac.Dispose();
> }
>
>
> Thanks in advance
> Danny Hille
[ Post a follow-up to this message ]
|