Opened 5 years ago
Closed 4 years ago
#1485367 closed Bugs (fixed)
online translator handles quotes incorrectly
| Reported by: | tensor | Owned by: | thomasb |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.2-stable |
| Component: | Localization | Version: | 0.2-alpha |
| Severity: | normal | Keywords: | translator |
| Cc: |
Description
Try using quote (") in a localized string. Commit into svn. Fire up the translator. Do some editing in the same string again. Generate a file. Now the .inc file contains several backslashes before the quotes in the string.
Change History (4)
comment:1 Changed 5 years ago by alec
comment:2 Changed 5 years ago by alec
- Keywords translator added
- Owner set to thomasb
comment:3 Changed 5 years ago by thomasb
- Component changed from Other to Translator
- Status changed from new to assigned
comment:4 Changed 4 years ago by thomasb
- Resolution set to fixed
- Status changed from assigned to closed
Fixed in r2083/svn
Note: See
TracTickets for help on using
tickets.

here's the patch
Index: func.php =================================================================== --- func.php (wersja 1895) +++ func.php (kopia robocza) @@ -122,7 +122,7 @@ if (empty($t_value) && isset($edit_values[$t_key])) $t_value = $edit_values[$t_key]; if (!empty($t_value)) - $out .= $array . "['$t_key'] = '" . addslashes($t_value) . "';\n"; + $out .= $array . "['$t_key'] = '" . addcslashes($t_value, '\\\'') . "';\n"; } $out .= "\n?>\n";