Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 130425 - Can't embed HTML in localized strings
Can't embed HTML in localized strings
Product: Red Hat Network
Classification: Red Hat
Component: RHN/R&D (Show other bugs)
RHN Devel
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ryan Bloom
Fanny Augustin
Depends On:
Blocks: rhnMilestone1
  Show dependency treegraph
Reported: 2004-08-20 09:37 EDT by Ryan Bloom
Modified: 2007-04-18 13:10 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-24 09:18:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ryan Bloom 2004-08-20 09:37:42 EDT
Because we are using XML for storing our localized strings, you can't
embed HTML in the localized version of the string.  If you try to use
straight HTML, the XML parser gets confused, and only includes the
part of the string within HTML tags.  For example:

    <msg id="message.defaultSystemGroups">Default system groups
updated for<strong>HA HA</strong></msg>

Will resolve to "HA HA".  If you escape the HTML and use:

    <msg id="message.defaultSystemGroups">Default system groups
updated for&lt;strong&gt;HA HA&lt;/strong&gt;</msg>

This resolves to: "Default system groups updated for <strong>HA

Neither of these is correct.  I need the <strong>/</strong> to be
unescaped when printed in the HTML stream.
Comment 1 Mike McCune 2004-08-20 12:10:17 EDT
Use CDATA around the body of the tag:

for example:

    <msg id="errors.header"><![CDATA[<div

Feel free to close this bug if this works for you.  It definitely
works for me and was my intention to use CDATA for all messages that
contain XML or HTML.

Comment 2 Jesus M. Rodriguez 2004-08-23 17:50:12 EDT
CDATA should most definitely work.  I suggested this to Ryan last week.
Comment 3 Ryan Bloom 2004-08-24 09:18:57 EDT
Turns out it is a combination of CDATA and telling the JSP to not
escape the xml tags.  Fixed now.

Note You need to log in before you can comment on or make changes to this bug.