#33351 closed defect (bug) (invalid)
Pre code tags not always working in Text mode
Reported by: | wordpresssites | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.2.4 |
Component: | Editor | Keywords: | needs-patch |
Focuses: | Cc: |
Description
The pre and code tags don't work when wrapping the <?php opening tag.
Tested on 4.2.3, 4.2.4 and 4.3
Attachments (1)
Change History (5)
#1
@
9 years ago
- Keywords needs-patch added
Confirmed in WordPress 4.3-RC2-33608 (latest nightly build).
The output displays nothing within the <code> tags.
#2
follow-up:
↓ 3
@
9 years ago
- Component changed from General to Editor
- Summary changed from pre code tags not working in 4.3 to Pre code tags not always working in Text mode
Happens in Text only, switching to Visual escapes the <
sign and it shows as expected.
Could reproduce as far back as 4.0.7.
#3
in reply to:
↑ 2
@
9 years ago
Replying to obenland:
Happens in Text only, switching to Visual escapes the
<
sign and it shows as expected.
Could reproduce as far back as 4.0.7.
Everyone who disabled the visual editor and is using these tags will have a problem.
Switching to Visual can also mess up all your PHP code.
#4
@
9 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
The Text editor supports HTML. In HTML <
, &
, "
and preferably >
have to be entities. Otherwise it is invalid HTML :)
These rules apply for the content of the <pre>
tag too. If you want better support for typing code samples, use one of the syntax highlighting plugins: https://wordpress.org/plugins/syntaxhighlighter/.
Screenshot