Automattic / wordpress-activitypub

ActivityPub for WordPress
https://wordpress.org/plugins/activitypub/
MIT License
489 stars 73 forks source link

css hex colors turned into tags #955

Open thingalon opened 2 hours ago

thingalon commented 2 hours ago

Quick summary

Related ticket: 8924019-zd-a8c

Any css hex color codes in the post_content get treated as potential hashtags, and become tags on the post.

e.g.: if your post body includes this

<span style="color:#ffffff">text</span>

Then the resultant post will get a tag ffffff which cannot be removed, as it is reapplied every time the post is edited.

Steps to reproduce

  1. Create a new Post, use the code editor.
  2. Enter an HTML tag with a css hex color code in its style. e.g.: <span style="color:#ffffff">
  3. Save the post
  4. Observe that the post now has a tag ffffff.
  5. Try removing the tag - either in the "Edit Post" screen or via "Quick Edit"
  6. The tag is re-added immediately upon removal.

What you expected to happen

Text that begins with a # inside an HTML attribute should be ignored when generating hashtags for a post.

What actually happened

CSS color codes from the post content are turned into tags.

Impact

One

Available workarounds?

Yes, easy to implement

Logs or notes

No response

github-actions[bot] commented 2 hours ago

Support References

This comment is automatically generated. Please do not edit it.