Skip to content
Snippets Groups Projects
Commit 2104466c authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#306374 by Damien Tournoud, slightly modified: avoid double escaping of translation suggestions

parent d68b49de
No related branches found
No related tags found
No related merge requests found
......@@ -69,8 +69,8 @@ function l10n_community_string_suggestions($langcode = NULL, $sid = 0) {
// Plural versions are shown in a short form.
// Since we no longer store an additional copy of strings in JS
// and the null byte is stripped out by browsers (?), we need to
// use a DOM-safe delimiter
$translation = check_plain(strpos($suggestion->translation, "\0") ? str_replace(chr(0), "; ", $suggestion->translation) : $suggestion->translation);
// use a DOM-safe delimiter: "; "
$translation = strpos($suggestion->translation, "\0") ? str_replace(chr(0), "; ", $suggestion->translation) : $suggestion->translation;
$translation = l10n_community_format_text($translation, $suggestion->sid);
$suggestions[] = $translation ."<div class='l10n-approval-buttons'>". $approve_button . $decline_button ."</div>" . '<div class="l10n-suggestion-by">' . t('by %user at %date', array('%user' => (empty($suggestion->name) ? variable_get('anonymous', t('Anonymous')) : $suggestion->name), '%date' => format_date($suggestion->time_entered))) . '</div>';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment