Escaping string arguments in i18n
Chusslove Illich
caslav.ilic at gmx.net
Sun Jun 15 13:36:10 BST 2008
> [: Oswald Buddenhagen :]
> can you please provide some concrete examples? the problems you are
> describing should not appear in reasonably crafted code usually, so i must
> be missing something.
Any filename in rich context will do. E.g, in:
"<qt>The template file <b>%1</b> does not exist.</qt>"
if the filename contains "<...>" substring, and it was not escaped before
substitution, Qt will eat it. Similarly with external messages:
"Unable to stop service <em>service</em>.<br /><br /><i>Error: %1</i>"
(both these examples do not substitute their arguments escaped).
Or, if the argument contained opening < which does not make a proper tag,
and is substituted before any proper tag, Qt will interpret the string as
non-rich text.
--
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080615/45e9dd08/attachment.sig>
More information about the kde-core-devel
mailing list