Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor: text is stripped within code tags #1109

Closed
shawnajean opened this issue Dec 1, 2015 · 5 comments
Closed

Editor: text is stripped within code tags #1109

shawnajean opened this issue Dec 1, 2015 · 5 comments
Labels
[Feature] Post/Page Editor The editor for editing posts and pages. [Type] Bug

Comments

@shawnajean
Copy link

If you add this text in the editor, this sentence displays correctly:

For example, <code>std::get&lt;0&gt;(tup)</code> retrieves the first element of a tuple.

However, if you add this text instead the <0> gets stripped out.

For example, <code>std::get<0>(tup)</code> retrieves the first element of a tuple.

0650ded4-7995-11e5-990c-7dd4bf87f512

This affects both the Calypso editor and WP.com's WP Admin editor. And both sentences publish correctly on my local install of core WP.

Test post on WP.com: https://testsjr1.wordpress.com/2015/10/23/testing-code-tags/

Test post on core install:
99131c26-7be0-11e5-9b23-f5a4b49a97bf

Ticket: 2195888-t

@shawnajean shawnajean added the [Feature] Post/Page Editor The editor for editing posts and pages. label Dec 1, 2015
@Ipstenu
Copy link

Ipstenu commented Dec 15, 2015

Related. If I write a post in code tags, some things get encapsulated.

[code]
&lt;strong&gt;Rating:&lt;/strong&gt; {% if page.rating %}{% for i in (1..page.rating) %}&lt;i style=&quot;color:gold;&quot; class=&quot;fa fa-star&quot; name=&quot;star&quot;&gt;&lt;/i&gt;{% endfor %}{% if 5 &gt; page.rating %}{% assign greystar = 5 | minus: page.rating %}{% for i in (1..greystar) %}&lt;i style=&quot;color:grey;&quot; class=&quot;fa fa-star&quot; name=&quot;star&quot;&gt;&lt;/i&gt;{% endfor %}{% endif %}{% else %}&lt;em&gt;Not Available&lt;/em&gt;{% endif %}
[/code]

It was fine in the normal WP editor, though.

@hoverduck
Copy link
Contributor

21Apr16 Bug Scrub

Confirmed, this is still an issue:
1109-gh-wp-calypso

@hoverduck
Copy link
Contributor

26May16 Bug Scrub

Confirmed this is still an issue.

@alisterscott
Copy link
Contributor

alisterscott commented Sep 29, 2016

This only effects within <code> <tags> </code> blocks, which is also not supported in wp-admin.

[code][/code] blocks supports adding within them, and an issue where reloading a post with these would reformat these has been fixed in #8325

I would suggest we close this as it's a limitation with wp-admin as well and the workaround to use [code][/code] blocks is acceptable.

@lancewillett
Copy link
Contributor

I would suggest we close this as it's a limitation with wp-admin as well and the workaround to use [code][/code] blocks is acceptable.

Done, agreed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Post/Page Editor The editor for editing posts and pages. [Type] Bug
Projects
None yet
Development

No branches or pull requests

5 participants