Plugin Directory

Changeset 3404583


Ignore:
Timestamp:
11/28/2025 03:31:32 AM (4 months ago)
Author:
dnesscarkey
Message:

6.3.14 Release

Location:
use-any-font
Files:
37 added
4 edited

Legend:

Unmodified
Added
Removed
  • use-any-font/trunk/includes/functions/uaf_font_functions.php

    r3246405 r3404583  
    184184                    $font_name = $fontsData[$fontImplementData['font_key']]['font_name'];
    185185                }?>
    186                 <?php echo esc_html($fontImplementData['font_elements']); ?>{
     186                <?php echo uaf_sanitize_css_selector($fontImplementData['font_elements']); ?>{
    187187                    font-family: '<?php echo esc_html($font_name);  ?>' !important;
    188188                }
     
    306306   
    307307    $custom_elements        = trim(sanitize_textarea_field($_POST['custom_elements']));
     308
     309    if ( empty($font_key) ) {
     310        return array(
     311            'status' => 'error',
     312            'body'   => 'Please select a font before assigning.'
     313        );
     314    }
     315
     316    if ( empty($elements) && empty($custom_elements) ) {
     317        return array(
     318            'status' => 'error',
     319            'body'   => 'Please select at least one element or add a custom element.'
     320        );
     321    }
    308322
    309323    $fontsData              = uaf_get_uploaded_font_data();
     
    471485    }
    472486}
     487
     488function uaf_sanitize_css_selector( $selector ) {
     489    // Allow only valid CSS selector characters
     490    return preg_replace(
     491        '/[^A-Za-z0-9\s\-\_\.\#\>\:\,\*\+\~\[\]\=\"\'\(\)\/]/',
     492        '',
     493        $selector
     494    );
     495}
  • use-any-font/trunk/includes/uaf_config.php

    r3304583 r3404583  
    22if ( ! defined( 'ABSPATH' ) ) exit;
    33
    4 $GLOBALS['uaf_current_version']             = '6.3.13';
     4$GLOBALS['uaf_current_version']             = '6.3.14';
    55
    66
  • use-any-font/trunk/readme.txt

    r3304583 r3404583  
    33Tags: custom fonts, font manager, font uploader, typography, google fonts
    44Requires at least: 4.0
    5 Tested up to: 6.8.1
    6 Stable tag: 6.3.13
     5Tested up to: 6.8.3
     6Stable tag: 6.3.14
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    171171== Changelog ==
    172172
     173= 6.3.14 =
     174* Added validation for font assign section.
     175* Fixed special characters issue in custom element box.
     176
    173177= 6.3.13 =
    174178* Fixed API key issue.
  • use-any-font/trunk/use-any-font.php

    r3304583 r3404583  
    66Description: Embed any font in your website
    77Author: Dnesscarkey
    8 Version: 6.3.13
     8Version: 6.3.14
    99Author URI: https://dineshkarki.com.np/use-any-font
    1010*/
Note: See TracChangeset for help on using the changeset viewer.