Plugin Directory

Changeset 2781035 for anrghg


Ignore:
Timestamp:
09/07/2022 01:44:35 AM (3 years ago)
Author:
anrghg
Message:

1.6.18.0
sanitize_title_with_dashes() only removes selected specimens.

1.6.18 (2022-09-07)

  • Localization: IDs and slugs: Fix sanitization by removing full classes.
  • Notes and sources: Lists: Correct line top and bottom padding.
  • Reference lists: Correct line top and bottom padding.
Location:
anrghg
Files:
1 deleted
12 edited
1 copied

Legend:

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

    r2780783 r2781035  
    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.17
     16 * Version: 1.6.18
    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.17' );
     103define( 'C_S_ANRGHG_VER', '1.6.18' );
    104104
    105105/**
  • anrghg/tags/1.6.18/includes/modular.php

    r2780783 r2781035  
    14331433
    14341434    /**
    1435      * Converts okina, letter apostrophe, and certain punctuation marks.
    1436      */
    1437     $l_a_needle  = array( 'ʻ', 'ʼ', '‐', '‑', '‒', '―', '−', '’', '\'' );
    1438     $l_a_replace = array( '_', '_', '-', '-', '-', '-', '-', '-', '-' );
    1439     $p_s_text    = str_replace( $l_a_needle, $l_a_replace, $p_s_text );
    1440 
    1441     /**
    1442      * Converts diacriticized letters to polygraphs, ß to ss, and pound sign to L.
     1435     * Converts diacriticized letters to polygraphs, ß to ss, currencies to letters.
    14431436     */
    14441437    // phpcs:ignore
    1445     $l_a_needle  = array( '£',  'ß',  'ẞ',  'Å',  'å',  'Ä',  'ä',  'Č',  'č',  'Ř',  'ř' );
    1446     $l_a_replace = array( 'L', 'ss', 'SS', 'Aa', 'aa', 'Ae', 'ae', 'Cz', 'cz', 'Rz', 'rz' );
     1438    $l_a_needle  = array( '$', '£', '¥',  'ß',  'ẞ',  'Å',  'å',  'Ä',  'ä',  'Č',  'č',  'Ř',  'ř' );
     1439    $l_a_replace = array( 'S', 'L', 'Y', 'ss', 'SS', 'Aa', 'aa', 'Ae', 'ae', 'Cz', 'cz', 'Rz', 'rz' );
    14471440    $l_a_lang    = explode( '-', get_bloginfo( 'language' ) );
    14481441    $l_s_lang    = $l_a_lang[0];
     
    14951488
    14961489    /**
    1497      * Converts to hyphen-minus. According to `sanitize_title_with_dashes()`.
    1498      */
    1499     $l_a_needle = array( '.', '/', ' ', '–', '—', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '
     1490     * Converts okina, letter apostrophe to underscore.
     1491     */
     1492    $l_a_needle = array( 'ʻ', 'ʼ' );
     1493    $p_s_text   = str_replace( $l_a_needle, '_', $p_s_text );
     1494
     1495    /**
     1496     * Converts to hyphen-minus. Pro parte according to `sanitize_title_with_dashes()`.
     1497     */
     1498    $l_a_needle = array( '&', '.', '’', '\'', '/', '\\', '*', '@', '·', '‧', ' ', ' ', '‐', '‑', '−', '‒', '–', '—', '―', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '
    15001499', '
    1501 ', ' ' );
     1500' );
    15021501    $p_s_text   = str_replace( $l_a_needle, '-', $p_s_text );
    15031502
     
    15101509     * Removes entirely. According to `sanitize_title_with_dashes()`.
    15111510     *
    1512      * @since 1.6.17 Percent sign is part of this set.
     1511     * @since 1.6.17 Percent sign is part of these classes (\p{Po}).
    15131512     * See * URL-decodes to avoid screwing up percent sign removal.
    15141513     * `sanitize_title_with_dashes()` also removes 11 “Non-visible
    15151514     * characters that display without a width”: U+00AD, U+200B,
    15161515     * 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 );
     1516     * U+202C, U+202D, U+202E, U+FEFF. Rather remove the full class
     1517     * of format controls (\p{Cf}). Do the same for punctuation,
     1518     * except Pc and Pd; also Sk, So, Lm, to catch full sets, that
     1519     * '%', '¡', '¿', '«', '»', '‹', '›', '‘', '’', '“', '”', '‚',
     1520     * '‛', '„', '‟', '•', '©', '®', '°', '…', '™', '´', 'ˊ' are in.
     1521     */
     1522    $p_s_text = preg_replace( '/[\\p{Cf}\\p{Ps}\\p{Pe}\\p{Pi}\\p{Pf}\\p{Po}\\p{Sk}\\p{So}\\p{Lm}]/u', '', $p_s_text );
    15221523
    15231524    /**
  • anrghg/tags/1.6.18/includes/stylesplit.php

    r2779832 r2781035  
    516516        $l_i_list_column_number_note        = anrghg_apply_config( 'anrghg_note_list_layout' );
    517517        $l_i_list_column_number_source      = anrghg_apply_config( 'anrghg_source_list_layout' );
    518         $l_s_list_row_pad_top               = 18 . 'px';
     518        $l_s_list_row_padding               = 6 . 'px';
    519519        $l_s_list_row_margin_top            = -7 . 'px';
    520520        $l_s_list_row_line_height           = 1.5 . 'em';
     
    734734                        opacity: 1;
    735735                        line-height: $l_s_list_row_line_height;
    736                         padding-top: $l_s_list_row_pad_top;
     736                        padding: $l_s_list_row_padding 0 $l_s_list_row_padding;
    737737                        transition: visibility 0s, opacity $l_s_transition_duration ease-in-out, line-height $l_s_transition_duration ease-in-out, padding-top $l_s_transition_duration ease-in-out;
    738738                    }
     
    754754                            opacity: 1 !important;
    755755                            line-height: $l_s_list_row_line_height !important;
    756                             padding-top: $l_s_list_row_pad_top !important;
     756                            padding: $l_s_list_row_padding 0 $l_s_list_row_padding !important;
    757757                        }
    758758
     
    762762                    .anrghg-display-toggle:not(:checked) + .anrghg-complement-list .anrghg-complement-row:target * {
    763763                        line-height: $l_s_list_row_line_height;
    764                         padding-top: $l_s_list_row_pad_top;
     764                        padding: $l_s_list_row_padding 0 $l_s_list_row_padding;
    765765                    }
    766766
     
    899899        $l_s_twistie_color_expanded         = '#CBCBCB'; // inherit, or #CBCBCB.
    900900        $l_s_transition_duration            = 300 . 'ms';
    901         $l_s_list_row_pad_top               = 18 . 'px';
     901        $l_s_list_row_padding               = 6 . 'px';
    902902        $l_s_list_row_line_height           = 2 . 'em';
    903903        $l_s_list_number_min_width          = 3.3 . 'em';
     
    10271027                        opacity: 1;
    10281028                        line-height: $l_s_list_row_line_height;
    1029                         padding-top: $l_s_list_row_pad_top;
     1029                        padding: $l_s_list_row_padding 0 $l_s_list_row_padding;
    10301030                        transition: visibility 0s, opacity $l_s_transition_duration ease-in-out, line-height $l_s_transition_duration ease-in-out, padding-top $l_s_transition_duration ease-in-out;
    10311031                    }
     
    10471047                            opacity: 1;
    10481048                            line-height: $l_s_list_row_line_height;
    1049                             padding-top: $l_s_list_row_pad_top;
     1049                            padding: $l_s_list_row_padding 0 $l_s_list_row_padding;
    10501050                        }
    10511051
     
    10561056                        opacity: 1;
    10571057                        line-height: $l_s_list_row_line_height;
    1058                         padding-top: $l_s_list_row_pad_top;
     1058                        padding: $l_s_list_row_padding 0 $l_s_list_row_padding;
    10591059                    }
    10601060
  • anrghg/tags/1.6.18/package.json

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

    r2780783 r2781035  
    88Requires PHP: 5.6
    99Tested PHP up to: 8.0
    10 Package Version: 1.6.17.0
    11 Version: 1.6.17
     10Package Version: 1.6.18.0
     11Version: 1.6.18
    1212CAUTION: The following field is parsed in `trunk/` for release configuration:
    13 Stable Tag: 1.6.17
     13Stable Tag: 1.6.18
    1414License: GPLv2 or later
    1515License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    542542== Changelog ==
    543543
     544= 1.6.18 (2022-09-07) =
     545
     546* Localization: IDs and slugs: Fix sanitization by removing full classes.
     547* Notes and sources: Lists: Correct line top and bottom padding.
     548* Reference lists: Correct line top and bottom padding.
     549
    544550= 1.6.17 (2022-09-06) =
    545551
    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.
     552* Localization: IDs and slugs: Maintain plus sign instead of letting it turn into space then hyphen-minus.
     553* Localization: IDs and slugs: Stop always deleting acute, grave, circumflex accents, macron and hacek.
     554* Localization: IDs and slugs: Optionally remove the full set of combining diacritics.
     555* Localization: IDs and slugs: Remove the full set of format control characters.
     556* Localization: IDs and slugs: Convert Latin alphabetic abbreviation indicators.
    551557
    552558= 1.6.16 (2022-09-05) =
    553559
    554 * Slug body class: Debug portions starting with an ampersand and ending with a semicolon.
    555 * Paragraph links: Debug portions starting with an ampersand and ending with a semicolon.
    556 * Heading links: Debug portions starting with an ampersand and ending with a semicolon.
     560* Localization: IDs and slugs: Debug portions starting with an ampersand and ending with a semicolon.
    557561
    558562= 1.6.15 (2022-09-04) =
  • anrghg/tags/1.6.18/svn-revs.txt

    r2780783 r2781035  
    1111Past revisions:
    1212
     131.6.17.0       2780783  2022-09-06 15:32:22 +0000 (Tue, 06 Sep 2022)
    13141.6.16.0       2780342  2022-09-05 21:34:56 +0000 (Mon, 05 Sep 2022)
    14151.6.15.0       2779832  2022-09-04 17:16:03 +0000 (Sun, 04 Sep 2022)
  • anrghg/trunk/anrghg.php

    r2780783 r2781035  
    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.17
     16 * Version: 1.6.18
    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.17' );
     103define( 'C_S_ANRGHG_VER', '1.6.18' );
    104104
    105105/**
  • anrghg/trunk/includes/modular.php

    r2780783 r2781035  
    14331433
    14341434    /**
    1435      * Converts okina, letter apostrophe, and certain punctuation marks.
    1436      */
    1437     $l_a_needle  = array( 'ʻ', 'ʼ', '‐', '‑', '‒', '―', '−', '’', '\'' );
    1438     $l_a_replace = array( '_', '_', '-', '-', '-', '-', '-', '-', '-' );
    1439     $p_s_text    = str_replace( $l_a_needle, $l_a_replace, $p_s_text );
    1440 
    1441     /**
    1442      * Converts diacriticized letters to polygraphs, ß to ss, and pound sign to L.
     1435     * Converts diacriticized letters to polygraphs, ß to ss, currencies to letters.
    14431436     */
    14441437    // phpcs:ignore
    1445     $l_a_needle  = array( '£',  'ß',  'ẞ',  'Å',  'å',  'Ä',  'ä',  'Č',  'č',  'Ř',  'ř' );
    1446     $l_a_replace = array( 'L', 'ss', 'SS', 'Aa', 'aa', 'Ae', 'ae', 'Cz', 'cz', 'Rz', 'rz' );
     1438    $l_a_needle  = array( '$', '£', '¥',  'ß',  'ẞ',  'Å',  'å',  'Ä',  'ä',  'Č',  'č',  'Ř',  'ř' );
     1439    $l_a_replace = array( 'S', 'L', 'Y', 'ss', 'SS', 'Aa', 'aa', 'Ae', 'ae', 'Cz', 'cz', 'Rz', 'rz' );
    14471440    $l_a_lang    = explode( '-', get_bloginfo( 'language' ) );
    14481441    $l_s_lang    = $l_a_lang[0];
     
    14951488
    14961489    /**
    1497      * Converts to hyphen-minus. According to `sanitize_title_with_dashes()`.
    1498      */
    1499     $l_a_needle = array( '.', '/', ' ', '–', '—', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '
     1490     * Converts okina, letter apostrophe to underscore.
     1491     */
     1492    $l_a_needle = array( 'ʻ', 'ʼ' );
     1493    $p_s_text   = str_replace( $l_a_needle, '_', $p_s_text );
     1494
     1495    /**
     1496     * Converts to hyphen-minus. Pro parte according to `sanitize_title_with_dashes()`.
     1497     */
     1498    $l_a_needle = array( '&', '.', '’', '\'', '/', '\\', '*', '@', '·', '‧', ' ', ' ', '‐', '‑', '−', '‒', '–', '—', '―', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '
    15001499', '
    1501 ', ' ' );
     1500' );
    15021501    $p_s_text   = str_replace( $l_a_needle, '-', $p_s_text );
    15031502
     
    15101509     * Removes entirely. According to `sanitize_title_with_dashes()`.
    15111510     *
    1512      * @since 1.6.17 Percent sign is part of this set.
     1511     * @since 1.6.17 Percent sign is part of these classes (\p{Po}).
    15131512     * See * URL-decodes to avoid screwing up percent sign removal.
    15141513     * `sanitize_title_with_dashes()` also removes 11 “Non-visible
    15151514     * characters that display without a width”: U+00AD, U+200B,
    15161515     * 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 );
     1516     * U+202C, U+202D, U+202E, U+FEFF. Rather remove the full class
     1517     * of format controls (\p{Cf}). Do the same for punctuation,
     1518     * except Pc and Pd; also Sk, So, Lm, to catch full sets, that
     1519     * '%', '¡', '¿', '«', '»', '‹', '›', '‘', '’', '“', '”', '‚',
     1520     * '‛', '„', '‟', '•', '©', '®', '°', '…', '™', '´', 'ˊ' are in.
     1521     */
     1522    $p_s_text = preg_replace( '/[\\p{Cf}\\p{Ps}\\p{Pe}\\p{Pi}\\p{Pf}\\p{Po}\\p{Sk}\\p{So}\\p{Lm}]/u', '', $p_s_text );
    15221523
    15231524    /**
  • anrghg/trunk/includes/stylesplit.php

    r2779832 r2781035  
    516516        $l_i_list_column_number_note        = anrghg_apply_config( 'anrghg_note_list_layout' );
    517517        $l_i_list_column_number_source      = anrghg_apply_config( 'anrghg_source_list_layout' );
    518         $l_s_list_row_pad_top               = 18 . 'px';
     518        $l_s_list_row_padding               = 6 . 'px';
    519519        $l_s_list_row_margin_top            = -7 . 'px';
    520520        $l_s_list_row_line_height           = 1.5 . 'em';
     
    734734                        opacity: 1;
    735735                        line-height: $l_s_list_row_line_height;
    736                         padding-top: $l_s_list_row_pad_top;
     736                        padding: $l_s_list_row_padding 0 $l_s_list_row_padding;
    737737                        transition: visibility 0s, opacity $l_s_transition_duration ease-in-out, line-height $l_s_transition_duration ease-in-out, padding-top $l_s_transition_duration ease-in-out;
    738738                    }
     
    754754                            opacity: 1 !important;
    755755                            line-height: $l_s_list_row_line_height !important;
    756                             padding-top: $l_s_list_row_pad_top !important;
     756                            padding: $l_s_list_row_padding 0 $l_s_list_row_padding !important;
    757757                        }
    758758
     
    762762                    .anrghg-display-toggle:not(:checked) + .anrghg-complement-list .anrghg-complement-row:target * {
    763763                        line-height: $l_s_list_row_line_height;
    764                         padding-top: $l_s_list_row_pad_top;
     764                        padding: $l_s_list_row_padding 0 $l_s_list_row_padding;
    765765                    }
    766766
     
    899899        $l_s_twistie_color_expanded         = '#CBCBCB'; // inherit, or #CBCBCB.
    900900        $l_s_transition_duration            = 300 . 'ms';
    901         $l_s_list_row_pad_top               = 18 . 'px';
     901        $l_s_list_row_padding               = 6 . 'px';
    902902        $l_s_list_row_line_height           = 2 . 'em';
    903903        $l_s_list_number_min_width          = 3.3 . 'em';
     
    10271027                        opacity: 1;
    10281028                        line-height: $l_s_list_row_line_height;
    1029                         padding-top: $l_s_list_row_pad_top;
     1029                        padding: $l_s_list_row_padding 0 $l_s_list_row_padding;
    10301030                        transition: visibility 0s, opacity $l_s_transition_duration ease-in-out, line-height $l_s_transition_duration ease-in-out, padding-top $l_s_transition_duration ease-in-out;
    10311031                    }
     
    10471047                            opacity: 1;
    10481048                            line-height: $l_s_list_row_line_height;
    1049                             padding-top: $l_s_list_row_pad_top;
     1049                            padding: $l_s_list_row_padding 0 $l_s_list_row_padding;
    10501050                        }
    10511051
     
    10561056                        opacity: 1;
    10571057                        line-height: $l_s_list_row_line_height;
    1058                         padding-top: $l_s_list_row_pad_top;
     1058                        padding: $l_s_list_row_padding 0 $l_s_list_row_padding;
    10591059                    }
    10601060
  • anrghg/trunk/package.json

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

    r2780783 r2781035  
    88Requires PHP: 5.6
    99Tested PHP up to: 8.0
    10 Package Version: 1.6.17.0
    11 Version: 1.6.17
     10Package Version: 1.6.18.0
     11Version: 1.6.18
    1212CAUTION: The following field is parsed in `trunk/` for release configuration:
    13 Stable Tag: 1.6.17
     13Stable Tag: 1.6.18
    1414License: GPLv2 or later
    1515License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    542542== Changelog ==
    543543
     544= 1.6.18 (2022-09-07) =
     545
     546* Localization: IDs and slugs: Fix sanitization by removing full classes.
     547* Notes and sources: Lists: Correct line top and bottom padding.
     548* Reference lists: Correct line top and bottom padding.
     549
    544550= 1.6.17 (2022-09-06) =
    545551
    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.
     552* Localization: IDs and slugs: Maintain plus sign instead of letting it turn into space then hyphen-minus.
     553* Localization: IDs and slugs: Stop always deleting acute, grave, circumflex accents, macron and hacek.
     554* Localization: IDs and slugs: Optionally remove the full set of combining diacritics.
     555* Localization: IDs and slugs: Remove the full set of format control characters.
     556* Localization: IDs and slugs: Convert Latin alphabetic abbreviation indicators.
    551557
    552558= 1.6.16 (2022-09-05) =
    553559
    554 * Slug body class: Debug portions starting with an ampersand and ending with a semicolon.
    555 * Paragraph links: Debug portions starting with an ampersand and ending with a semicolon.
    556 * Heading links: Debug portions starting with an ampersand and ending with a semicolon.
     560* Localization: IDs and slugs: Debug portions starting with an ampersand and ending with a semicolon.
    557561
    558562= 1.6.15 (2022-09-04) =
  • anrghg/trunk/svn-revs.txt

    r2780783 r2781035  
    1111Past revisions:
    1212
     131.6.17.0       2780783  2022-09-06 15:32:22 +0000 (Tue, 06 Sep 2022)
    13141.6.16.0       2780342  2022-09-05 21:34:56 +0000 (Mon, 05 Sep 2022)
    14151.6.15.0       2779832  2022-09-04 17:16:03 +0000 (Sun, 04 Sep 2022)
Note: See TracChangeset for help on using the changeset viewer.