You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by Florian Holeczek <fl...@holeczek.de> on 2008/01/20 18:01:37 UTC

HTML entities in JSPWiki css blocks

Hi there,

is JSPWiki behaving as intended when no HTML entities are allowed in,
I guess, CSS blocks? The problem occurs in localized error messages
which are boxed in a %%error block and also in the tab texts.

Regards,
 Florian


Re: HTML entities in JSPWiki css blocks

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
> Just to be sure, because this collides with the current instructions
> in the German language files:

Entirely possible.  The instructions were written before we had to  
fix some security problems just prior to 2.6.0 release, and this was  
one of the areas affected.

It's also possible - though I haven't checked - that this issue only  
concerns CoreResources.properties and PluginResources.properties.

>> "Die Stra\u00DFenangabe 'Strau\u00DFenweg 10' ist ung\u00FCltig!"
>
> then?

Well, you don't have to.  You can write German fully in Latin1, which  
is the encoding of the files, so you don't have to encode anything;  
just make sure you save in Latin1 (8859-1).  So feel free to leave  
the ü:s and ä:s in place.

(You can check the Finnish localization; that's how it works.)

/Janne

Re: HTML entities in JSPWiki css blocks

Posted by Florian Holeczek <fl...@holeczek.de>.
> Yes, this is rather unavoidable, and to fix it in any non-hackish
> way would need a redesign of the rendering pipeline.

Mhh ok, I've been guessing this already...

> Please put in the correct ISO-8859-1 code instead of the HTML
> entity. You can also use the native2ascii utility, if needed.

Just to be sure, because this collides with the current instructions
in the German language files:
> # Please, do not forget to use proper HTML entities, so
> # " = &quot;
> # ' = &#39;  Note that &apos; is NOT HTML, and does not necessarily work in all browsers.

"Die Straßenangabe 'Straußenweg 10' ist ungültig!"

becomes

"Die Stra\u00DFenangabe 'Strau\u00DFenweg 10' ist ung\u00FCltig!"

then?

In particular, the '' and "" don't have to be escaped via \u0022 and
\u0027 ? I'm asking because native2Ascii doesn't do that.

If so, I'll change these instructions, too.

> It's clearer, saves space, makes editing of the localization easier,
> and is in general a lot less hassle.

Well that's true, once the rules are clear :-)

Regards,
 Florian



Re: HTML entities in JSPWiki css blocks

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
On 24 Jan 2008, at 00:33, Florian Holeczek wrote:

>> Could you please post an example, e.g. on jspwiki.org?
>
> Well, not really! jspwiki.org is in english, AFAIK there are no HTML
> entities in the default localization files.
> I'm working on improving the German translation and replaced all the
> ü,ä a.s.o. by their HTML entities &uuml; a.s.o., then this error
> appeared on many pages.
> Let's take this example:
> validate.invalidemail=Die E-Mail-Adresse ist ung&uuml;ltig!
> This shows up as ung&uuml;ltig and not as ungültig.

Ah yes, now I see what you mean.

Yes, this is rather unavoidable, and to fix it in any non-hackish way  
would need a redesign of the rendering pipeline.  Please put in the  
correct ISO-8859-1 code instead of the HTML entity.  You can also use  
the native2ascii utility, if needed.

It's clearer, saves space, makes editing of the localization easier,  
and is in general a lot less hassle.

/Janne

Re: HTML entities in JSPWiki css blocks

Posted by Florian Holeczek <fl...@holeczek.de>.
> Could you please post an example, e.g. on jspwiki.org?

Well, not really! jspwiki.org is in english, AFAIK there are no HTML
entities in the default localization files.
I'm working on improving the German translation and replaced all the
ü,ä a.s.o. by their HTML entities &uuml; a.s.o., then this error
appeared on many pages.
Let's take this example:
validate.invalidemail=Die E-Mail-Adresse ist ung&uuml;ltig!
This shows up as ung&uuml;ltig and not as ungültig.

Regards,
 Florian



Re: HTML entities in JSPWiki css blocks

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
Could you please post an example, e.g. on jspwiki.org?

/Janne

On 20 Jan 2008, at 19:01, Florian Holeczek wrote:

> Hi there,
>
> is JSPWiki behaving as intended when no HTML entities are allowed in,
> I guess, CSS blocks? The problem occurs in localized error messages
> which are boxed in a %%error block and also in the tab texts.
>
> Regards,
>  Florian