XML encoding CMS content

23 views
Skip to first unread message

Stefan Buchali

unread,
Apr 22, 2009, 3:16:07 AM4/22/09
to RedDot CMS Users
Hello,

RedDot CMS offers an option to "not convert to HTML" its elements.
This ends up in either outputting "Ä & Ü are German umlauts." or
"Ä & Ü are German umlauts."

There is no possibility to just convert the five XML-reserved chars,
saying: "Ä &amp Ü are German umlauts."

So I went a bit on investigation and found the following way to do
this by using render tags:

<%!! Context:CurrentPage.Headline.Replace(&, &amp;).Replace(",
&quot;) !!%>

It seems to work fine, but as this is not documented, I get no
official ok from RedDot Support to use it.

Has anyone used this before and is this known to run properly?


Kind regards,
Stefan

markus giesen

unread,
Apr 22, 2009, 5:10:40 AM4/22/09
to RedDot CMS Users
Hi Stefan,

before v9 I had some issues with colons :
inside text element and escaping them.
Can you confirm, that this issue doesn't affect your project?

Cheers,
Markus

Stefan Buchali

unread,
Apr 22, 2009, 9:30:21 AM4/22/09
to RedDot CMS Users
Hi Markus,
I just replace " and & for the moment, so I don't get an error if
there are colons in the element.

... but just to confirm that I got you right:

Page headline contains e.g.:
Rendertags: & "Tägs"

<%!! Context:CurrentPage.Headline.Replace(&, &amp;).Replace(",
&quot;) !!%> outputs:
Rendertags: &amp; &quot;Tägs&quot;

(as you can see it is possible to leave out the "Str:" prefix!)


I hope the documentation is coming soon...!


Regards,
Stefan

Udo Baldewein (SIMAJA OHG)

unread,
Apr 22, 2009, 3:31:57 AM4/22/09
to RedDot-C...@googlegroups.com
Hi Stefan,

i will make it short:

You can use: <%!! Escape:HtmlEncode(Context:CurrentPage.Headline) !!%>

Best regards

mit freundlichen Grüßen aus der Lüneburger Heide

Udo Baldewein
Geschäftsführer / CTO

SIMAJA OHG - Internet Solutions
Georg-Leppien-Str. 7
21337 Lüneburg

Fon: +49(0)4131.75800-21
Fax: +49(0)4131.75800-29
E-Mail: udo.ba...@simaja.de
Web: www.simaja.de

Geschäftsführende Gesellschafter
Bernd Grote und Udo Baldewein
Sitz: Lüneburg
Registergericht: Lüneburg HRA 2032
USt.-Id: DE 227157256
SIMAJA ist "RedDot certified Partner" der RedDot Solutions AG

--- Ursprüngliche Nachricht ---
Absender: Stefan Buchali (stefan....@gmail.com)
Empfänger: RedDot CMS Users (RedDot-C...@googlegroups.com)
Betreff: XML encoding CMS content
Datum: Mi. 22.04.2009 09:16

markus giesen

unread,
Apr 22, 2009, 11:03:00 AM4/22/09
to RedDot CMS Users
Hi Stefan, yep you got me right, the problems which I where pointing
to can be found in the comments here
http://www.reddotcmsblog.com/character-encoding-within-navigation-manager

or in the german translation here
http://blog.markusgiesen.de/2009/03/12/character-enconding-im-navigation-manager-und-die-neue-version-des-open-text-web-solutions-servers-9-eigentlich-reddot-cms-76/

Best regards!
Markus Giesen

On 22 Apr., 17:31, "Udo Baldewein (SIMAJA OHG)"
<udo.baldew...@simaja.de> wrote:
> Hi Stefan,
>
> i will make it short:
>
> You can use: <%!! Escape:HtmlEncode(Context:CurrentPage.Headline) !!%>
>
> Best regards
>
> mit freundlichen Grüßen aus der Lüneburger Heide
>
> Udo Baldewein
> Geschäftsführer / CTO
>
> SIMAJA OHG - Internet Solutions
> Georg-Leppien-Str. 7
> 21337 Lüneburg
>
> Fon: +49(0)4131.75800-21
> Fax: +49(0)4131.75800-29
> E-Mail: udo.baldew...@simaja.de
> Web:www.simaja.de
>
> Geschäftsführende Gesellschafter
> Bernd Grote und Udo Baldewein
> Sitz: Lüneburg
> Registergericht: Lüneburg HRA 2032
> USt.-Id: DE 227157256
> SIMAJA ist "RedDot certified Partner" der RedDot Solutions AG
>
> --- Ursprüngliche Nachricht ---
> Absender: Stefan Buchali (stefan.buch...@gmail.com)

Stefan Buchali

unread,
Apr 23, 2009, 9:08:24 AM4/23/09
to RedDot CMS Users
Hi Markus,
I tried this and it seems that this colon: problem occurs only within
navigation tags!

<%!! Escape:HtmlEncode(Context:CurrentPage.Headline) !!%> --> works
fine
<%!! Escape:HtmlEncode(Context:CurrentIndex.Page.Headline) !!%> -->
empty if colon

... but back on the replace issue. Using the escape method (ok this IS
documented and therefore supported) results in &#228; entities for my
nice german umlauts. In fact, there should be a Escape:XmlEncode
method...


Regards,
Stefan
Reply all
Reply to author
Forward
0 new messages