Opened 8 years ago
Closed 8 years ago
#31631 closed defect (bug) (fixed)
Issue with "HTML escaping" in theme customizer
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | 4.1 |
Component: | Customize | Keywords: | |
Focuses: | Cc: |
Description
Hi,
there seems to be an issue in the "HTML escaping" in theme customizer.
Attached a screen-shot of the French twentyfifteen theme, included with WP 4.1.1
What is strange to is that "Image d'arrière-plan" seems to be declared only once within the fr-FR PO file
#: wp-includes/class-wp-customize-control.php:894
#: wp-includes/class-wp-customize-manager.php:1099
msgid "Background Image"
msgstr "Image d’arrière-plan"
but it is displayed correctly on one line and incorrectly on the 2nd one. So I assume it is an issue in the customizer (or in the theme itself), but not in the French translation.
Thanks.
CJ
Attachments (1)
Change History (9)
#4
@
8 years ago
- Owner set to ocean90
- Resolution set to fixed
- Status changed from new to closed
In 32885:
#5
follow-up:
↓ 6
@
8 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Just to chime in, a CSS with the following code added to a customizer textarea (for example, in my theme its a custom css textarea) will have the >
escaped to >
.content > #header
Becomes
.content > #header
#6
in reply to:
↑ 5
;
follow-up:
↓ 7
@
8 years ago
- Resolution set to fixed
- Status changed from reopened to closed
- Version changed from 4.1.1 to 4.1
Replying to Collizo4sky:
Hello @Collizo4sky, can you please open a new ticket for that? Please also include some code for testing and the steps to reproduce your issue. Thanks!
#7
in reply to:
↑ 6
;
follow-up:
↓ 8
@
8 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Replying to ocean90:
Replying to Collizo4sky:
Hello @Collizo4sky, can you please open a new ticket for that? Please also include some code for testing and the steps to reproduce your issue. Thanks!
I would have done so but am not sure if this is the fault of the theme author or customizer because i don't know if the customizer API include a callback function for sanitizing user input which the theme author might be using wrongly.
Here is the code for the custom css in customizer the theme is using. See if you can spot any problem.
<?php function customcss_customizer( $wp_customize ) { $wp_customize->add_section( 'customcss_section', array( 'title' => 'Custom CSS', 'description' => 'Insert Custom CSS lines here', 'priority' => 41, ) ); $wp_customize->add_setting( 'tb_webpaint_customcss',array( 'transport' => 'postMessage', 'sanitize_callback' => 'textonly_sanitize') ); $wp_customize->add_control( new tb_textarea_Control( $wp_customize, 'tb_webpaint_customcss', array( 'label' => 'Custom CSS', 'section' => 'customcss_section', 'settings' => 'tb_webpaint_customcss' ) ) ); if ( $wp_customize->is_preview() && ! is_admin() ){ add_action( 'wp_footer', 'customcss_customizer_preview', 21); } } add_action( 'customize_register', 'customcss_customizer' ); function customcss_customizer_preview() { ?> <script type="text/javascript"> ( function() { wp.customize('tb_webpaint_customcss',function( value ) { value.bind(function(to) { jQuery("#customizercss").text(to); }); }); } )( jQuery ) </script> <?php } // End function example_customize_preview() ?>
#8
in reply to:
↑ 7
@
8 years ago
- Resolution set to fixed
- Status changed from reopened to closed
Replying to Collizo4sky:
In this case please contact author of your theme and/or use our Support Forums for troubleshooting.
Please do not reopen this ticket as your issue isn't related to this. Thank you.
Screen-shot