[wp-trac] [WordPress Trac] #24106: Simplify wp_slash()

WordPress Trac noreply at wordpress.org
Thu Jan 11 03:35:03 UTC 2018


#24106: Simplify wp_slash()
-------------------------------------------------+-------------------------
 Reporter:  TobiasBg                             |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Formatting                           |  Release
 Severity:  normal                               |     Version:  3.6
 Keywords:  has-patch needs-unit-tests dev-      |  Resolution:
  feedback                                       |     Focuses:
-------------------------------------------------+-------------------------

Comment (by jrf):

 Came across the code of `wp_slash()` today and just couldn't help but
 wonder why a recursive function wasn't properly implemented as recursive.

 Searching led me to this ticket and #42195. /cc @johnbillion

 I've prepared a patch which would fix both tickets and which unifies and
 adds to the unit tests uploaded in previous patches for this ticket by
 @SergeyBiryukov and @devesine.

 Before I upload the new patch, I'd like to get some clarification on how
 objects should be handled.

 In my opinion, object property values should never be slashed, but I saw
 some unit tests in the previous uploads which don't seem to agree with
 that.

 Reaching a consensus on how objects should be handled by `wp_slash()` is a
 prerequisite for any patch dealing with this and #42195.

 @pento Got an opinion on this ?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/24106#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list