addcslashes to .info

droplet - November 3, 2009 - 03:28
Project:Translation template extractor
Version:6.x-3.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs review
Description

There isn't addcslashes to .info stings, is it by design ? (Command line extraction)

example:

#: active_n_rebuild/active_n_rebuild.info:0
msgid "[EN] Table-based multi-column extended theme (for Web developers).<br />Work with PHP5 (PHP4 - with no waranty).<br />Copyright &copy; 2009 <a href="http://lynxlab.net" title="Open Lynxlab project (in a new window)" target="_blank">Lynxlab.net</a>"
msgstr ""

#1

Gábor Hojtsy - November 3, 2009 - 14:25

Wow, we definitely did not expect people to put HTML into their descriptions. Looks like this needs to be fixed indeed.

#2

JohnAlbin - November 11, 2009 - 09:49

Zen has been doing this for quite a while. :-D

The theme description links to the online documentation.

#3

Gábor Hojtsy - December 7, 2009 - 18:09
Status:active» needs review

Ok, I've looked at the existing code, and not at all sure why it uses

<?php
addcslashes
($value, "\0..\37\\\"")
?>
for stuff coming from previously quoted strings, (after stripping off existing quotes in _potx_format_quoted_string()) but I've applied this same treatment to the info file strings. Let me know if this works for you. Bytes from \0 to \37 should never appear in .info file strings anyway, theoretically.

Please test and review so we can fix this issue.

AttachmentSize
addslashes-info.patch 1.12 KB
 
 

Drupal is a registered trademark of Dries Buytaert.