[wp-trac] [WordPress Trac] #33756: Improve docs for sanitize_title()
WordPress Trac
noreply at wordpress.org
Sun Apr 16 20:45:18 UTC 2017
#33756: Improve docs for sanitize_title()
----------------------------------------+-----------------------------
Reporter: ericlewis | Owner: psdtohtmlguru
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Future Release
Component: Posts, Post Types | Version:
Severity: normal | Resolution:
Keywords: needs-patch good-first-bug | Focuses: docs
----------------------------------------+-----------------------------
Comment (by shulard):
Maybe it's just that the `sanitize_title` function is sometimes used to
generate an id or class from a string to ensure that non authorized
characters are not used... Maybe useful only when generating attributes
from inputed text.
Replying to [comment:15 gma992]:
> @wonderboymusic
> {{{
> Sanitizes a string for use as a slug in a URL. is incomplete. Also
sanitizes for use as HTML id or class attribute value. There may be other
uses...
> }}}
>
>
> Not sure if I'm missing something here, but basically sanitize_title()
strip tags, removes accents and replace special characters, right? I'm not
really sure what you mean with id or class attribute value.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33756#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list