Opened 8 months ago
Last modified 8 months ago
#131 new enhancement
Unit Tests for Core #21767 (Remove stripslashes from API functions)
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Escaping | Keywords: | |
| Cc: | nacin |
Description
Wanted to start contributing the tests needed for this core ticket:
http://core.trac.wordpress.org/ticket/21767
Coverage is not yet sufficient, but this initial patch does cover posts, post meta and comments.
There is also a change to remove the manual adding of slashes in the methods to create comments. This was the only object that was getting "properly" slashed before the WP model API functions were called (in other words, all other objects were doing it wrong) and the core patch obviates the need for this.
Attachments (2)
Change History (5)
alexkingorg — 8 months ago
comment:2
alexkingorg — 8 months ago
Commit access huh?
I did an initial commit that covers:
- posts
- post meta
- comments
- comment meta
http://unit-tests.trac.wordpress.org/changeset/1041
I also noticed some slash tests in tests/meta.php that will need to be revised. I'm holding off on those types of changes until we're ready for the patch to land.
comment:3
alexkingorg — 8 months ago
Ok, I've committed what I believe to be reasonable coverage for core ticket 21767 in revision 1071.
I'm also attaching a patch for removing the additional slashes in the factory class - this will need to be committed when 21767 lands.


Initial test coverage (posts, post meta, comments) and slash fix in comment test methods.