Opened 11 years ago
Closed 11 years ago
#32670 closed defect (bug) (fixed)
Menu names in customizer shows HTML entities
| Reported by: | markoheijnen | Owned by: | ocean90 |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.3 |
| Component: | Customize | Version: | 4.3 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
Currently when "Menus" is translated with entities like ' for Dutch "Menu's" then it's not correctly parsed due to the usage of {{menu.title}}. When this is menu.title then the value is displayed correctly.
I only fixed it for menus but I saw other places with only 2 brackets too. Unsure when to use what.
Attachments (2)
Change History (9)
#3
@
11 years ago
Looking over the code, I do see places where it's placed but it doesn't work. It still could placed when WP_Customize_Nav_Menus_Panel get's created but the title of WP_Customize_Nav_Menu_Section already get's it but still fails to parse correctly.
#4
@
11 years ago
The following code does work. I placed it inside WP_Customize_Panel->json();
$array['title'] = $output = preg_replace_callback("/(&#[0-9]+;)/", function($m) { return mb_convert_encoding($m[1], "UTF-8", "HTML-ENTITIES"); }, $array['title']);
#5
@
11 years ago
- Keywords has-patch added; needs-patch removed
32670.patch adds html_entity_decode() to section/panel titles.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
{{}}is needed for escaping. We probably missed an instance ofhtml_entity_decode().