Make WordPress Core


Ignore:
Timestamp:
08/25/2017 11:27:55 PM (9 years ago)
Author:
SergeyBiryukov
Message:

Formatting: In sanitize_title_with_dashes(), convert forward slash to hyphen on save.

Props corvidism, jtsternberg, GhostToast, alxndr.
Fixes #10792.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php

    r36775 r41318  
    110110
    111111        /**
     112         * @ticket 10792
     113         */
     114        function test_replaces_forward_slash() {
     115                $this->assertEquals("songs-by-lennon-mccartney", sanitize_title_with_dashes("songs by Lennon/McCartney", '', 'save'));
     116                $this->assertEquals("songs-by-lennon-mccartney", sanitize_title_with_dashes("songs by Lennon//McCartney", '', 'save'));
     117                $this->assertEquals("songs-by-lennon-mccartney", sanitize_title_with_dashes("songs by Lennon///McCartney", '', 'save'));
     118                $this->assertEquals("songs-by-lennon-mccartney", sanitize_title_with_dashes("songs by Lennon/-McCartney", '', 'save'));
     119                $this->assertEquals("songs-by-lennon-mccartney", sanitize_title_with_dashes("//songs by Lennon/McCartney", '', 'save'));
     120        }
     121
     122        /**
    112123         * @ticket 19820
    113124         */
Note: See TracChangeset for help on using the changeset viewer.