Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
l10n_server-3352485
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
l10n_server-3352485
Commits
2104466c
There was an error fetching the commit references. Please try again later.
Commit
2104466c
authored
16 years ago
by
Gábor Hojtsy
Browse files
Options
Downloads
Patches
Plain Diff
#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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
l10n_community/ajax.inc
+2
-2
2 additions, 2 deletions
l10n_community/ajax.inc
with
2 additions
and
2 deletions
l10n_community/ajax.inc
+
2
−
2
View file @
2104466c
...
...
@@ -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>'
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment