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

Support Underline & Language selection #203

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

dd32
Copy link
Member

@dd32 dd32 commented Apr 18, 2024

As reported in https://wordpress.org/support/topic/issue-with-underline-rendering-in-forum/ & https://meta.trac.wordpress.org/ticket/7599 certain styles are not being respected properly.

This PR adds the needed tags for Underline and Language selection.

Note: For WordPress.org I'm likely to remove some of these once I figure out how :)

@@ -263,6 +263,8 @@ public function get_kses_for_allowed_blocks( array $tags ) {
$tags['mark'] = [ 'class' => true ];
$tags['sub'] = [];
$tags['sup'] = [];
$tags['span'] = [ 'style' => true ];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I'm fairly sure there's been some kses changes around having style validation, but I'm not sure if this is 100% safe without validating that functionality does actually exist.

@dd32
Copy link
Member Author

dd32 commented Apr 18, 2024

It turns out that the underline isn't coming from core, but rather from the calypso editor, which I guess BE is based on somewhere in the chain, it's actually wpcom/underline:

https://github.com/Automattic/wp-calypso/blob/f190f2f4b6f17d67c85a64061196f4cf9a949a4f/apps/wpcom-block-editor/src/default/features/rich-text.js#L15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant