Opened 8 years ago
Last modified 8 years ago
#39472 new defect (bug)
Code tag still parses embeds
Reported by: | rmens | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | Embeds | Keywords: | needs-patch |
Focuses: | Cc: |
Description
WordPress 4.7.
The 'code' block in the WordPress editor behaves incorrectly.
For example:
<code>Test Test Another www.google.com http://www.google.com https://www.youtube.com/watch?v=JHw6LTuMkNQ Foxtrot Uniform Charlie Kilo </code>
Displays as normal code in the wp-admin, but once published it creates an embed on the page. This should not happen and the contents of the code block should be displayed without embeds.
Attachments (3)
Change History (8)
#1
follow-up:
↓ 2
@
8 years ago
@rmens
The YouTube link would be converted with an embed by WP automatically.
https://codex.wordpress.org/Embeds
WordPress will automatically turn the URL into a YouTube embed and provide a live preview in the visual editor.
If you used say
<code>Test Test
Another
<a href="www.google.com">www.google.com</a>
<a href="http://www.google.com">http://www.google.com</a>
<a href="https://www.youtube.com/watch?v=JHw6LTuMkNQ">https://www.youtube.com/watch?v=JHw6LTuMkNQ</a>
Foxtrot Uniform Charlie Kilo
</code>
#2
in reply to:
↑ 1
@
8 years ago
Replying to lukecavanagh:
@rmens
The YouTube link would be converted with an embed by WP automatically.
I'm aware of this, but should that really happen inside code blocks?
#3
@
8 years ago
@rmens
Not sure if having code blocks around a YouTube link would make any difference currently with the emded.
#4
@
8 years ago
- Component changed from Formatting to Embeds
- Keywords needs-patch added
Agreed that this is bug-worthy, embeds should not be processed within <code>
or <pre>
tags if at all possible.
#5
@
8 years ago
Also reported as a support forums issue after the upgrade to bbPress 2.x: #meta2469.
Expected output