Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#41455 closed defect (bug) (invalid)

Text widget removes php

Reported by: WPwebbouw Owned by:
Priority: normal Milestone:
Component: Widgets Version:
Severity: normal Keywords:
Cc: Focuses:

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)

#1 @marsjaninzmarsa
9 years ago

  • Resolutioninvalid
  • Status newclosed

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.

#2 @SergeyBiryukov
9 years ago

  • Component GeneralWidgets
  • Milestone Awaiting Review
Note: See TracTickets for help on using tickets.