Plugin Directory

Changeset 2780783 for anrghg


Ignore:
Timestamp:
09/06/2022 03:32:22 PM (3 years ago)
Author:
anrghg
Message:

1.6.17.0

1.6.17 (2022-09-06)

  • Localization: Fragment IDs and slugs: Maintain plus sign instead of letting it turn into space then hyphen-minus.
  • Localization: Fragment IDs and slugs: Stop always deleting acute, grave, circumflex accents, macron and hacek.
  • Localization: Fragment IDs and slugs: Optionally remove the full set of combining diacritics.
  • Localization: Fragment IDs and slugs: Remove the full set of format control characters.
  • Localization: Fragment IDs and slugs: Convert Latin alphabetic abbreviation indicators.
Location:
anrghg
Files:
1 deleted
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • anrghg/tags/1.6.17/anrghg.php

    r2780342 r2780783  
    1414 * Tested PHP up to: 8.0
    1515 * CAUTION: The following field is parsed in the `stable tag` folder for upgrade configuration:
    16  * Version: 1.6.16
     16 * Version: 1.6.17
    1717 * Author: ANRGHG
    1818 * Author URI: https://anrghg.sunsite.fr
     
    101101 * @var string C_S_ANRGHG_VER  Plugin version constant.
    102102 */
    103 define( 'C_S_ANRGHG_VER', '1.6.16' );
     103define( 'C_S_ANRGHG_VER', '1.6.17' );
    104104
    105105/**
  • anrghg/tags/1.6.17/includes/modular.php

    r2780342 r2780783  
    13131313
    13141314/**
     1315 * URL-decodes while maintaining plus signs.
     1316 *
     1317 * @since 1.6.17
     1318 * `urldecode()` converts a plus sign to a space, despite
     1319 * `+` is allowed in URLs but some apps turn it to `%20`.
     1320 * @link https://support.google.com/webmasters/thread/62860395/does-having-plus-signs-vs-hyphens-to-separate-words-in-your-url-slug-impact-your-seo?hl=en
     1321 * To match user expectations, `+` is decoded beforehand.
     1322 * @param  string $p_s_string String to decode.
     1323 * @return string
     1324 */
     1325function anrghg_url_decode( $p_s_string ) {
     1326    $p_s_string = str_replace( '%2B', '+', $p_s_string );
     1327    $p_s_string = urldecode( $p_s_string );
     1328    return $p_s_string;
     1329}
     1330
     1331/**
    13151332 * Derives simplified fragment identifiers.
    13161333 *
     
    13711388
    13721389    /**
     1390     * Decodes HTML entities, reencodes &, <, >.
     1391     *
     1392     * @since 1.6.16
     1393     */
     1394    $p_s_text = html_entity_decode( $p_s_text );
     1395    $p_s_text = preg_replace( '/&/', '&amp;', $p_s_text );
     1396    $p_s_text = preg_replace( array( '/</', '/>/' ), array( '&lt;', '&gt;' ), $p_s_text );
     1397
     1398    /**
     1399     * URL-decodes to avoid screwing up percent sign removal.
     1400     *
     1401     * @since 1.6.17
     1402     */
     1403    $p_s_text = anrghg_url_decode( $p_s_text );
     1404
     1405    /**
    13731406     * Optionally converts to lowercase before configurable conversions.
    13741407     */
     
    13841417
    13851418    /**
    1386      * Decodes HTML entities, reencodes &, <, >.
    1387      *
    1388      * @since 1.6.16
    1389      */
    1390     $p_s_text = html_entity_decode( $p_s_text );
    1391     $p_s_text = preg_replace( '/&/', '&amp;', $p_s_text );
    1392     $p_s_text = preg_replace( array( '/</', '/>/' ), array( '&lt;', '&gt;' ), $p_s_text );
    1393 
    1394     /**
    1395      * Performs a configurable set of additional conversions.
     1419     * Performs a configurable set of custom conversions.
    13961420     */
    13971421    $l_a_needle      = array();
     
    14311455
    14321456    /**
     1457     * Converts Latin alphabetic abbreviation indicators.
     1458     *
     1459     * @since 1.6.17
     1460     * Preformatted superscript small q has not been encoded, by lack of usage.
     1461     */
     1462    $l_a_needle  = array( 'ª', 'º', 'ᵃ', 'ᵇ', 'ᶜ', 'ᵈ', 'ᵉ', 'ᶠ', 'ᵍ', 'ʰ', 'ⁱ', 'ʲ', 'ᵏ', 'ˡ', 'ᵐ', 'ⁿ', 'ᵒ', 'ᵖ', 'ʳ', 'ˢ', 'ᵗ', 'ᵘ', 'ᵛ', 'ʷ', 'ˣ', 'ʸ', 'ᶻ' );
     1463    $l_a_replace = array( 'a', 'o', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' );
     1464    $p_s_text    = str_replace( $l_a_needle, $l_a_replace, $p_s_text );
     1465
     1466    /**
    14331467     * Performs a set of alphabetic conversions, partly in `remove_accents()`.
    14341468     */
     
    14471481    /**
    14481482     * Removes accents.
     1483     *
     1484     * @since 1.6.17 Stop always deleting acute, grave, circumflex accents, macron and hacek.
     1485     * `sanitize_title_with_dashes()` always selectively deletes 5 combining diacritics, but
     1486     * leaves all others alone, even combining tilde. Vietnamese acute tone mark is part of
     1487     * the deletion, but Vietnamese grave tone mark is not, although both are deprecated.
     1488     * Full list: U+0301, U+0341, U+0300, U+0304, U+030C.
     1489     * @since 1.6.17 Optionally remove the full set of combining diacritics.
    14491490     */
    14501491    if ( anrghg_apply_config( 'anrghg_fragment_ids_remove_accents' ) ) {
    14511492        $p_s_text = remove_accents( $p_s_text );
    1452     }
    1453 
    1454     /**
    1455      * Converts to hyphen-minus, from `sanitize_title_with_dashes`.
    1456      */
    1457     $l_a_needle  = array( '/', ' ', '–', '—', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '
     1493        $p_s_text = preg_replace( '/\\p{M}/u', '', $p_s_text );
     1494    }
     1495
     1496    /**
     1497     * Converts to hyphen-minus. According to `sanitize_title_with_dashes()`.
     1498     */
     1499    $l_a_needle = array( '.', '/', ' ', '–', '—', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '
    14581500', '
    14591501', ' ' );
    1460     $l_a_replace = '-';
    1461     $p_s_text    = str_replace( $l_a_needle, $l_a_replace, $p_s_text );
    1462 
    1463     /**
    1464      * Converts period to hyphen-minus, from `sanitize_title_with_dashes`.
    1465      */
    1466     $p_s_text = str_replace( '.', '-', $p_s_text );
    1467 
    1468     /**
    1469      * Converts to 'x', from `sanitize_title_with_dashes`.
     1502    $p_s_text   = str_replace( $l_a_needle, '-', $p_s_text );
     1503
     1504    /**
     1505     * Converts to 'x'. According to `sanitize_title_with_dashes()`.
    14701506     */
    14711507    $p_s_text = str_replace( '×', 'x', $p_s_text );
    14721508
    14731509    /**
    1474      * Removes entirely, from `sanitize_title_with_dashes`.
    1475      */
    1476     $l_a_needle  = array( '­', '¡', '¿', '«', '»', '‹', '›', '‘', '’', '“', '”', '‚', '‛', '„', '‟', '•', '©', '®', '°', '…', '™', '´', 'ˊ' );
    1477     $l_a_replace = '';
    1478     $p_s_text    = str_replace( $l_a_needle, $l_a_replace, $p_s_text );
    1479 
    1480     /**
    1481      * Removes percent signs that are not part of an octet, from `sanitize_title_with_dashes`.
    1482      */
    1483     $p_s_text = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $p_s_text );
    1484     $p_s_text = str_replace( '%', '', $p_s_text );
    1485     $p_s_text = preg_replace( '|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $p_s_text );
    1486 
    1487     /**
    1488      * Determines the text length and max length.
    1489      */
    1490     $l_s_text_length = strlen( $p_s_text );
    1491 
    1492     /**
    1493      * Percent-encodes, from `sanitize_title_with_dashes` but with configurable max length.
    1494      */
    1495     if ( seems_utf8( $p_s_text ) ) {
    1496             $p_s_text = utf8_uri_encode( $p_s_text, intval( $p_i_max_length ) );
    1497     }
    1498 
    1499     /**
    1500      * Removes the remainder from `sanitize_title_with_dashes`.
    1501      */
    1502     $p_s_text = str_replace(
    1503         array(
    1504             // Combining acute accents.
    1505             '%cc%81',
    1506             '%cd%81',
    1507             // Combining grave accent, macron, caron.
    1508             '%cc%80',
    1509             '%cc%84',
    1510             '%cc%8c',
    1511             // Non-visible characters that display without a width.
    1512             '%e2%80%8b',
    1513             '%e2%80%8c',
    1514             '%e2%80%8d',
    1515             '%e2%80%8e',
    1516             '%e2%80%8f',
    1517             '%e2%80%aa',
    1518             '%e2%80%ab',
    1519             '%e2%80%ac',
    1520             '%e2%80%ad',
    1521             '%e2%80%ae',
    1522             '%ef%bb%bf',
    1523         ),
    1524         '',
    1525         $p_s_text
    1526     );
    1527 
    1528     /**
    1529      * Cleans up.
    1530      */
    1531     $p_s_text = preg_replace( '/[^%A-Za-z0-9 _-]/', '', $p_s_text );
     1510     * Removes entirely. According to `sanitize_title_with_dashes()`.
     1511     *
     1512     * @since 1.6.17 Percent sign is part of this set.
     1513     * See * URL-decodes to avoid screwing up percent sign removal.
     1514     * `sanitize_title_with_dashes()` also removes 11 “Non-visible
     1515     * characters that display without a width”: U+00AD, U+200B,
     1516     * U+200B, U+200C, U+200D, U+200E, U+200F, U+202A, U+202B,
     1517     * U+202C, U+202D, U+202E, U+FEFF. Rather remove the full set.
     1518     */
     1519    $p_s_text   = preg_replace( '/\\p{Cf}/u', '', $p_s_text );
     1520    $l_a_needle = array( '%', '¡', '¿', '«', '»', '‹', '›', '‘', '’', '“', '”', '‚', '‛', '„', '‟', '•', '©', '®', '°', '…', '™', '´', 'ˊ' );
     1521    $p_s_text   = str_replace( $l_a_needle, '', $p_s_text );
    15321522
    15331523    /**
     
    15371527
    15381528    /**
    1539      * Crops leading and trailing hyphen-minus.
     1529     * Crops leading, trailing hyphen-minus.
    15401530     */
    15411531    $p_s_text = trim( $p_s_text, '-' );
     
    15481538     */
    15491539    $p_s_text = preg_replace( '/-+/', '-', $p_s_text );
     1540
     1541    /**
     1542     * Stores the text length for informed truncation.
     1543     */
     1544    $l_s_text_length = strlen( $p_s_text );
     1545
     1546    /**
     1547     * Percent-encodes. From `sanitize_title_with_dashes()`.
     1548     *
     1549     * @since 0.9.0 The max length is configurable.
     1550     * @since 1.6.17 Fall back on legacy clean-up, as else the job is done.
     1551     */
     1552    if ( seems_utf8( $p_s_text ) ) {
     1553        $p_s_text = utf8_uri_encode( $p_s_text, intval( $p_i_max_length ) );
     1554    } else {
     1555        $p_s_text = preg_replace( '/[^%A-Za-z0-9 _-]/', '', $p_s_text );
     1556    }
    15501557
    15511558    /**
     
    17081715    }
    17091716    if ( $p_b_decode ) {
    1710         $p_s_string = urldecode( $p_s_string );
     1717        $p_s_string = anrghg_url_decode( $p_s_string );
    17111718    } else {
    17121719        $p_s_string = preg_replace( '/%[0-9A-Fa-f]{2}/', '', $p_s_string );
  • anrghg/tags/1.6.17/package.json

    r2779832 r2780783  
    11{
    22    "name": "anrghg",
    3     "version": " 1.6.15",
     3    "version": " 1.6.17",
    44    "description": "A.N.R.GHG Publishing Helper",
    55    "main": "index.js",
  • anrghg/tags/1.6.17/readme.txt

    r2780342 r2780783  
    88Requires PHP: 5.6
    99Tested PHP up to: 8.0
    10 Package Version: 1.6.16.0
    11 Version: 1.6.16
     10Package Version: 1.6.17.0
     11Version: 1.6.17
    1212CAUTION: The following field is parsed in `trunk/` for release configuration:
    13 Stable Tag: 1.6.16
     13Stable Tag: 1.6.17
    1414License: GPLv2 or later
    1515License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    542542== Changelog ==
    543543
     544= 1.6.17 (2022-09-06) =
     545
     546* Localization: Fragment IDs and slugs: Maintain plus sign instead of letting it turn into space then hyphen-minus.
     547* Localization: Fragment IDs and slugs: Stop always deleting acute, grave, circumflex accents, macron and hacek.
     548* Localization: Fragment IDs and slugs: Optionally remove the full set of combining diacritics.
     549* Localization: Fragment IDs and slugs: Remove the full set of format control characters.
     550* Localization: Fragment IDs and slugs: Convert Latin alphabetic abbreviation indicators.
     551
    544552= 1.6.16 (2022-09-05) =
    545553
  • anrghg/tags/1.6.17/svn-revs.txt

    r2780342 r2780783  
    1111Past revisions:
    1212
     131.6.16.0       2780342  2022-09-05 21:34:56 +0000 (Mon, 05 Sep 2022)
    13141.6.15.0       2779832  2022-09-04 17:16:03 +0000 (Sun, 04 Sep 2022)
    14151.6.14.0       2779672  2022-09-04 04:48:35 +0000 (Sun, 04 Sep 2022)
  • anrghg/trunk/anrghg.php

    r2780342 r2780783  
    1414 * Tested PHP up to: 8.0
    1515 * CAUTION: The following field is parsed in the `stable tag` folder for upgrade configuration:
    16  * Version: 1.6.16
     16 * Version: 1.6.17
    1717 * Author: ANRGHG
    1818 * Author URI: https://anrghg.sunsite.fr
     
    101101 * @var string C_S_ANRGHG_VER  Plugin version constant.
    102102 */
    103 define( 'C_S_ANRGHG_VER', '1.6.16' );
     103define( 'C_S_ANRGHG_VER', '1.6.17' );
    104104
    105105/**
  • anrghg/trunk/includes/modular.php

    r2780342 r2780783  
    13131313
    13141314/**
     1315 * URL-decodes while maintaining plus signs.
     1316 *
     1317 * @since 1.6.17
     1318 * `urldecode()` converts a plus sign to a space, despite
     1319 * `+` is allowed in URLs but some apps turn it to `%20`.
     1320 * @link https://support.google.com/webmasters/thread/62860395/does-having-plus-signs-vs-hyphens-to-separate-words-in-your-url-slug-impact-your-seo?hl=en
     1321 * To match user expectations, `+` is decoded beforehand.
     1322 * @param  string $p_s_string String to decode.
     1323 * @return string
     1324 */
     1325function anrghg_url_decode( $p_s_string ) {
     1326    $p_s_string = str_replace( '%2B', '+', $p_s_string );
     1327    $p_s_string = urldecode( $p_s_string );
     1328    return $p_s_string;
     1329}
     1330
     1331/**
    13151332 * Derives simplified fragment identifiers.
    13161333 *
     
    13711388
    13721389    /**
     1390     * Decodes HTML entities, reencodes &, <, >.
     1391     *
     1392     * @since 1.6.16
     1393     */
     1394    $p_s_text = html_entity_decode( $p_s_text );
     1395    $p_s_text = preg_replace( '/&/', '&amp;', $p_s_text );
     1396    $p_s_text = preg_replace( array( '/</', '/>/' ), array( '&lt;', '&gt;' ), $p_s_text );
     1397
     1398    /**
     1399     * URL-decodes to avoid screwing up percent sign removal.
     1400     *
     1401     * @since 1.6.17
     1402     */
     1403    $p_s_text = anrghg_url_decode( $p_s_text );
     1404
     1405    /**
    13731406     * Optionally converts to lowercase before configurable conversions.
    13741407     */
     
    13841417
    13851418    /**
    1386      * Decodes HTML entities, reencodes &, <, >.
    1387      *
    1388      * @since 1.6.16
    1389      */
    1390     $p_s_text = html_entity_decode( $p_s_text );
    1391     $p_s_text = preg_replace( '/&/', '&amp;', $p_s_text );
    1392     $p_s_text = preg_replace( array( '/</', '/>/' ), array( '&lt;', '&gt;' ), $p_s_text );
    1393 
    1394     /**
    1395      * Performs a configurable set of additional conversions.
     1419     * Performs a configurable set of custom conversions.
    13961420     */
    13971421    $l_a_needle      = array();
     
    14311455
    14321456    /**
     1457     * Converts Latin alphabetic abbreviation indicators.
     1458     *
     1459     * @since 1.6.17
     1460     * Preformatted superscript small q has not been encoded, by lack of usage.
     1461     */
     1462    $l_a_needle  = array( 'ª', 'º', 'ᵃ', 'ᵇ', 'ᶜ', 'ᵈ', 'ᵉ', 'ᶠ', 'ᵍ', 'ʰ', 'ⁱ', 'ʲ', 'ᵏ', 'ˡ', 'ᵐ', 'ⁿ', 'ᵒ', 'ᵖ', 'ʳ', 'ˢ', 'ᵗ', 'ᵘ', 'ᵛ', 'ʷ', 'ˣ', 'ʸ', 'ᶻ' );
     1463    $l_a_replace = array( 'a', 'o', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' );
     1464    $p_s_text    = str_replace( $l_a_needle, $l_a_replace, $p_s_text );
     1465
     1466    /**
    14331467     * Performs a set of alphabetic conversions, partly in `remove_accents()`.
    14341468     */
     
    14471481    /**
    14481482     * Removes accents.
     1483     *
     1484     * @since 1.6.17 Stop always deleting acute, grave, circumflex accents, macron and hacek.
     1485     * `sanitize_title_with_dashes()` always selectively deletes 5 combining diacritics, but
     1486     * leaves all others alone, even combining tilde. Vietnamese acute tone mark is part of
     1487     * the deletion, but Vietnamese grave tone mark is not, although both are deprecated.
     1488     * Full list: U+0301, U+0341, U+0300, U+0304, U+030C.
     1489     * @since 1.6.17 Optionally remove the full set of combining diacritics.
    14491490     */
    14501491    if ( anrghg_apply_config( 'anrghg_fragment_ids_remove_accents' ) ) {
    14511492        $p_s_text = remove_accents( $p_s_text );
    1452     }
    1453 
    1454     /**
    1455      * Converts to hyphen-minus, from `sanitize_title_with_dashes`.
    1456      */
    1457     $l_a_needle  = array( '/', ' ', '–', '—', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '
     1493        $p_s_text = preg_replace( '/\\p{M}/u', '', $p_s_text );
     1494    }
     1495
     1496    /**
     1497     * Converts to hyphen-minus. According to `sanitize_title_with_dashes()`.
     1498     */
     1499    $l_a_needle = array( '.', '/', ' ', '–', '—', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '
    14581500', '
    14591501', ' ' );
    1460     $l_a_replace = '-';
    1461     $p_s_text    = str_replace( $l_a_needle, $l_a_replace, $p_s_text );
    1462 
    1463     /**
    1464      * Converts period to hyphen-minus, from `sanitize_title_with_dashes`.
    1465      */
    1466     $p_s_text = str_replace( '.', '-', $p_s_text );
    1467 
    1468     /**
    1469      * Converts to 'x', from `sanitize_title_with_dashes`.
     1502    $p_s_text   = str_replace( $l_a_needle, '-', $p_s_text );
     1503
     1504    /**
     1505     * Converts to 'x'. According to `sanitize_title_with_dashes()`.
    14701506     */
    14711507    $p_s_text = str_replace( '×', 'x', $p_s_text );
    14721508
    14731509    /**
    1474      * Removes entirely, from `sanitize_title_with_dashes`.
    1475      */
    1476     $l_a_needle  = array( '­', '¡', '¿', '«', '»', '‹', '›', '‘', '’', '“', '”', '‚', '‛', '„', '‟', '•', '©', '®', '°', '…', '™', '´', 'ˊ' );
    1477     $l_a_replace = '';
    1478     $p_s_text    = str_replace( $l_a_needle, $l_a_replace, $p_s_text );
    1479 
    1480     /**
    1481      * Removes percent signs that are not part of an octet, from `sanitize_title_with_dashes`.
    1482      */
    1483     $p_s_text = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $p_s_text );
    1484     $p_s_text = str_replace( '%', '', $p_s_text );
    1485     $p_s_text = preg_replace( '|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $p_s_text );
    1486 
    1487     /**
    1488      * Determines the text length and max length.
    1489      */
    1490     $l_s_text_length = strlen( $p_s_text );
    1491 
    1492     /**
    1493      * Percent-encodes, from `sanitize_title_with_dashes` but with configurable max length.
    1494      */
    1495     if ( seems_utf8( $p_s_text ) ) {
    1496             $p_s_text = utf8_uri_encode( $p_s_text, intval( $p_i_max_length ) );
    1497     }
    1498 
    1499     /**
    1500      * Removes the remainder from `sanitize_title_with_dashes`.
    1501      */
    1502     $p_s_text = str_replace(
    1503         array(
    1504             // Combining acute accents.
    1505             '%cc%81',
    1506             '%cd%81',
    1507             // Combining grave accent, macron, caron.
    1508             '%cc%80',
    1509             '%cc%84',
    1510             '%cc%8c',
    1511             // Non-visible characters that display without a width.
    1512             '%e2%80%8b',
    1513             '%e2%80%8c',
    1514             '%e2%80%8d',
    1515             '%e2%80%8e',
    1516             '%e2%80%8f',
    1517             '%e2%80%aa',
    1518             '%e2%80%ab',
    1519             '%e2%80%ac',
    1520             '%e2%80%ad',
    1521             '%e2%80%ae',
    1522             '%ef%bb%bf',
    1523         ),
    1524         '',
    1525         $p_s_text
    1526     );
    1527 
    1528     /**
    1529      * Cleans up.
    1530      */
    1531     $p_s_text = preg_replace( '/[^%A-Za-z0-9 _-]/', '', $p_s_text );
     1510     * Removes entirely. According to `sanitize_title_with_dashes()`.
     1511     *
     1512     * @since 1.6.17 Percent sign is part of this set.
     1513     * See * URL-decodes to avoid screwing up percent sign removal.
     1514     * `sanitize_title_with_dashes()` also removes 11 “Non-visible
     1515     * characters that display without a width”: U+00AD, U+200B,
     1516     * U+200B, U+200C, U+200D, U+200E, U+200F, U+202A, U+202B,
     1517     * U+202C, U+202D, U+202E, U+FEFF. Rather remove the full set.
     1518     */
     1519    $p_s_text   = preg_replace( '/\\p{Cf}/u', '', $p_s_text );
     1520    $l_a_needle = array( '%', '¡', '¿', '«', '»', '‹', '›', '‘', '’', '“', '”', '‚', '‛', '„', '‟', '•', '©', '®', '°', '…', '™', '´', 'ˊ' );
     1521    $p_s_text   = str_replace( $l_a_needle, '', $p_s_text );
    15321522
    15331523    /**
     
    15371527
    15381528    /**
    1539      * Crops leading and trailing hyphen-minus.
     1529     * Crops leading, trailing hyphen-minus.
    15401530     */
    15411531    $p_s_text = trim( $p_s_text, '-' );
     
    15481538     */
    15491539    $p_s_text = preg_replace( '/-+/', '-', $p_s_text );
     1540
     1541    /**
     1542     * Stores the text length for informed truncation.
     1543     */
     1544    $l_s_text_length = strlen( $p_s_text );
     1545
     1546    /**
     1547     * Percent-encodes. From `sanitize_title_with_dashes()`.
     1548     *
     1549     * @since 0.9.0 The max length is configurable.
     1550     * @since 1.6.17 Fall back on legacy clean-up, as else the job is done.
     1551     */
     1552    if ( seems_utf8( $p_s_text ) ) {
     1553        $p_s_text = utf8_uri_encode( $p_s_text, intval( $p_i_max_length ) );
     1554    } else {
     1555        $p_s_text = preg_replace( '/[^%A-Za-z0-9 _-]/', '', $p_s_text );
     1556    }
    15501557
    15511558    /**
     
    17081715    }
    17091716    if ( $p_b_decode ) {
    1710         $p_s_string = urldecode( $p_s_string );
     1717        $p_s_string = anrghg_url_decode( $p_s_string );
    17111718    } else {
    17121719        $p_s_string = preg_replace( '/%[0-9A-Fa-f]{2}/', '', $p_s_string );
  • anrghg/trunk/package.json

    r2779832 r2780783  
    11{
    22    "name": "anrghg",
    3     "version": " 1.6.15",
     3    "version": " 1.6.17",
    44    "description": "A.N.R.GHG Publishing Helper",
    55    "main": "index.js",
  • anrghg/trunk/readme.txt

    r2780342 r2780783  
    88Requires PHP: 5.6
    99Tested PHP up to: 8.0
    10 Package Version: 1.6.16.0
    11 Version: 1.6.16
     10Package Version: 1.6.17.0
     11Version: 1.6.17
    1212CAUTION: The following field is parsed in `trunk/` for release configuration:
    13 Stable Tag: 1.6.16
     13Stable Tag: 1.6.17
    1414License: GPLv2 or later
    1515License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    542542== Changelog ==
    543543
     544= 1.6.17 (2022-09-06) =
     545
     546* Localization: Fragment IDs and slugs: Maintain plus sign instead of letting it turn into space then hyphen-minus.
     547* Localization: Fragment IDs and slugs: Stop always deleting acute, grave, circumflex accents, macron and hacek.
     548* Localization: Fragment IDs and slugs: Optionally remove the full set of combining diacritics.
     549* Localization: Fragment IDs and slugs: Remove the full set of format control characters.
     550* Localization: Fragment IDs and slugs: Convert Latin alphabetic abbreviation indicators.
     551
    544552= 1.6.16 (2022-09-05) =
    545553
  • anrghg/trunk/svn-revs.txt

    r2780342 r2780783  
    1111Past revisions:
    1212
     131.6.16.0       2780342  2022-09-05 21:34:56 +0000 (Mon, 05 Sep 2022)
    13141.6.15.0       2779832  2022-09-04 17:16:03 +0000 (Sun, 04 Sep 2022)
    14151.6.14.0       2779672  2022-09-04 04:48:35 +0000 (Sun, 04 Sep 2022)
Note: See TracChangeset for help on using the changeset viewer.