#41455 closed defect (bug) (invalid)
Text widget removes php
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Widgets | Keywords: | |
Focuses: | Cc: |
Description
Just tested the 4.8.1 RC1 on a test site.
I use the Php text plugin a lot (https://nl.wordpress.org/plugins/php-text-widget/). That plugin filters the content of the text widget to enable php code in text widgets.
Code between <?php ?> tags including the tags is either removed or placed inside html comments upon switching between Visual and Text mode.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Current WordPress behavior is correct - content allowed for text widget is HTML code, and PHP is not valid HTML code. If default purpose of native widget is extended/shifted by 3rd party code, that's up to 3rd party to cover new model and also extend sanitization. Or, better, to don't mess with core widget and to create dedicated one.
Problem is with plugin, not with core.