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

Please add <br> tags to the allowed list. #4

Closed
mihdan opened this issue Sep 20, 2019 · 6 comments

Comments

@mihdan
Copy link

commented Sep 20, 2019

Before:

private $allowed_html = [
		'p'      => [],
		'a'      => [
			'href'  => [],
			'title' => [],
			'rel'   => [],
		],
		'em'     => [],
		'strong' => [],
	];

After:

private $allowed_html = [
		'p'      => [],
                'br'      => [],
		'a'      => [
			'href'  => [],
			'title' => [],
			'rel'   => [],
                        'class'   => [],
		],
		'em'     => [],
		'strong' => [],
	];
@aristath aristath closed this in 64ab4f3 Sep 22, 2019
@aristath

This comment has been minimized.

Copy link
Member

commented Sep 22, 2019

Added. The list was discussed on the TRT channel briefly (see https://wordpress.slack.com/archives/C02RP4Y3K/p1569150008145800 for reference) and it was also decided to remove the title tag from links.

@aristath

This comment has been minimized.

Copy link
Member

commented Sep 22, 2019

Released version 1.0.1 with the above tweaks.

@mihdan

This comment has been minimized.

Copy link
Author

commented Sep 22, 2019

What about class attribute for links?

@aristath

This comment has been minimized.

Copy link
Member

commented Sep 22, 2019

Why would you need that?

@mihdan

This comment has been minimized.

Copy link
Author

commented Sep 22, 2019

I want to show buttons in notifications:

aristath added a commit that referenced this issue Sep 22, 2019
@aristath

This comment has been minimized.

Copy link
Member

commented Sep 22, 2019

@mihdan Added the wptrt_admin_notices_allowed_html, you can use that to change the tags.
In your specific example however, it can be done just fine using a normal link in the content instead of a button below the content, and it wouldn't take away anything from the user experience.
You can now add a class using the filter mentioned.
However, if possible it would be good to avoid it, and keep the notices as small as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.