Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#41827 closed defect (bug) (wontfix)

add sanitize_html_class in whole class while there is no spacing.

Reported by: umangvaghela123's profile umangvaghela123 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch
Focuses: administration Cc:

Description


Attachments (1)

41827.patch (1.4 KB) - added by umangvaghela123 7 years ago.

Download all attachments as: .zip

Change History (6)

#1 @umangvaghela123
7 years ago

  • Focuses administration added
  • Keywords has-patch added

#2 @SergeyBiryukov
7 years ago

Hi @umangvaghela123, thanks for the patch!

Sanitizing functions are meant for user input or variables that come from various APIs, what's the benefit of sanitizing a hardcoded string?

#3 @umangvaghela123
7 years ago

Hi @SergeyBiryukov

Thank you for Quick response.When We use the sanitize_html_class() function in HTML that time it is good for us to use sanitize whole class but it is required to check class that has no space.We add the like 'plugin-card-' that time our CSS is not working, but CSS is working when we apply "plugin-card-1" or "2" something in class.It is fine If we use this one.

One advantage: Reduce the chances of the conflict in CSS between class.

Last edited 7 years ago by umangvaghela123 (previous) (diff)

#4 @danieltj
7 years ago

This seems like it'd probably fit better as part of a plugin if needed. Instead of targeting keys you could use nth-of-type in your CSS which would pick up the relevant rows without adding any actual specific HTML markup.

#5 @SergeyBiryukov
6 years ago

  • Component changed from General to Administration
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Doen't look like any core changes are needed here. Feel free to reopen if I missed something :)

Note: See TracTickets for help on using tickets.