[wp-meta] [Making WordPress.org] #2925: occurence of literal '\0' in docblock `@param` of wp_kses_no_null() causes a null character in the corresponding meta_value

Making WordPress.org noreply at wordpress.org
Wed Jul 5 12:51:02 UTC 2017


#2925: occurence of literal '\0' in docblock `@param` of wp_kses_no_null() causes
a null character in the corresponding meta_value
---------------------------+------------------
 Reporter:  pbiron         |       Owner:
     Type:  defect         |      Status:  new
 Priority:  normal         |   Milestone:
Component:  Developer Hub  |  Resolution:
 Keywords:                 |
---------------------------+------------------

Comment (by pbiron):

 Replying to [comment:3 Otto42]:
 > Umm, no, we are not changing the core docblocks to fix a problem in the
 devhub parser.
 >
 > If the devhub parser can't handle it, then the parser needs to be fixed.

 I completely agree!  For example, see #2900.

 I mentioned the double-escaping "fix" for a couple of reasons:

 1. as possible work around if the `parsedown` or `phpdoc-parser` can't be
 quickly fixed...because as it stands, the display of that Code Ref page is
 misleading and could result in developers thinking `wp_kses_no_null()` is
 not doing what the documentation says it should.
 1. I haven't had the time to dig into `parsedown` or the rest of `phpdoc-
 parser` to be positive they are the cause of the problem; tho as stated in
 the ticket description, I'm think that's where the problem lies.
 1. I wasn't sure that `phpdoc-parser` was actually supposed to handle that
 escape sequence.  I haven't been able to find any documentation on what
 "markdown/escape sequences" are acceptable in docblocks.  There is nothing
 about this mentioned in [[https://make.wordpress.org/core/handbook/best-
 practices/inline-documentation-standards/php/|PHP Documentation
 Standards]] about this.  '''Hint:''' it would be really good to document
 that so that contributors know what is/is not allowed.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/2925#comment:4>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list