Skip to content

Commit

Permalink
Encode URI component in typography (#2584)
Browse files Browse the repository at this point in the history
* Encode URI component in typography

* Remove WP 6.1 and add 6.4

* Remove WP 6.2. Does not meet Woo minimum version support.

* Bump codeql to v2

* Bump git action versions

* Rename codeql-analysis workflow file

* Revert file name
  • Loading branch information
EvanHerman committed Feb 20, 2024
1 parent b915473 commit 1c247b7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/github-codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -68,4 +68,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
3 changes: 1 addition & 2 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ jobs:
fail-fast: false
matrix:
wp: # Test against Prev-Prev Major, Prev-Major, and current Major release versions.
- "6.2"
- "6.3"
# - "6.4" Should enable this when 6.4 is released.
- "6.4"
theme:
- "https://downloads.wordpress.org/theme/go.zip"
- "" # Default theme is TwentyTwentyThree
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
php: ['7.4','8.0','8.1','8.2']
wp: ['6.3', '6.2', '6.1']
wp: ['6.4', '6.3']
name: PHP Unit ${{ matrix.php }} | WP Version ${{ matrix.wp }}
uses: ./.github/workflows/test-php-unit.yml
with:
Expand Down
4 changes: 2 additions & 2 deletions src/components/font-family/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ function FontFamilyPicker( { label, value, help, instanceId, onChange, className
if ( ba.length > 0 ) {
//Load fonts on the header
if ( ! ba.includes( event.target.value ) && ! isSystemFont ) {
link.href = 'https://fonts.googleapis.com/css?family=' + event.target.value.replace( / /g, '+' ) + googleFontsAttr;
link.href = 'https://fonts.googleapis.com/css?family=' + window.encodeURIComponent( event.target.value.replace( / /g, '+' ) ) + googleFontsAttr;
document.head.appendChild( link );
}

ba = ba.replace( ',' + event.target.value, '' );
ba = ba + ',' + event.target.value;
} else {
link.href = 'https://fonts.googleapis.com/css?family=' + event.target.value.replace( / /g, '+' ) + googleFontsAttr;
link.href = 'https://fonts.googleapis.com/css?family=' + window.encodeURIComponent( event.target.value.replace( / /g, '+' ) ) + googleFontsAttr;
document.head.appendChild( link );

ba = event.target.value;
Expand Down

0 comments on commit 1c247b7

Please sign in to comment.