Plugin Directory

Changeset 3129768


Ignore:
Timestamp:
08/01/2024 11:35:33 PM (20 months ago)
Author:
jamesdlow
Message:

1.4.0

  • Escape more properties in SettingsLib
Location:
pageapp
Files:
18 added
3 edited

Legend:

Unmodified
Added
Removed
  • pageapp/trunk/inc/settingslib.php

    r3126398 r3129768  
    103103        return '
    104104        <tr valign="top" class="'.$setting->id.'">
    105             <th scope="row">'.$setting->title.($setting->type=='text'&&$setting->description?'<div style="font-weight:normal;">'.$setting->description.'</div>':'').'</th>
     105            <th scope="row">'.esc_html($setting->title).($setting->type=='text'&&$setting->description?'<div style="font-weight:normal;">'.esc_html($setting->description).'</div>':'').'</th>
    106106            <td>'.$html.'</td>
    107107        </tr>';
    108108    }
    109109    public static function settings_text($setting) {
    110         $html = '<textarea id="'.$setting->id.'" name="'.$setting->id.'" rows="10" cols="70" />'.esc_html(get_option($setting->id)).'</textarea>';
     110        $html = '<textarea id="'.esc_attr($setting->id).'" name="'.esc_attr($setting->id).'" rows="10" cols="70" />'.esc_html(get_option($setting->id)).'</textarea>';
    111111        return self::settings_row($setting, $html);
    112112    }
     
    114114        $assoc = self::associative($setting->values);
    115115        $current = get_option($setting->id);
    116         $html = '<select id="'.$setting->id.'" name="'.$setting->id.'">';
     116        $html = '<select id="'.esc_attr($setting->id).'" name="'.esc_attr($setting->id).'">';
    117117        foreach ($setting->values as $key => $name) {
    118118            $value = $assoc ? $key : $name;
     
    123123    }
    124124    public static function settings_checkbox($setting) {
    125         $html = '<input type="checkbox" id="'.$setting->id.'" name="'.$setting->id.'"'.(get_option($setting->id) == '1' ? ' checked="checked"' : '').' />';
    126         $html .= '<label for="name="'.$setting->id.'"">'.(property_exists($setting,'description')?$setting->description:'Enable').'</label>';
     125        $html = '<input type="checkbox" id="'.esc_attr($setting->id).'" name="'.esc_attr($setting->id).'"'.(get_option($setting->id) == '1' ? ' checked="checked"' : '').' />';
     126        $html .= '<label for="name="'.esc_attr($setting->id).'"">'.(property_exists($setting,'description')?esc_html($setting->description):'Enable').'</label>';
    127127        return self::settings_row($setting, $html);
    128128    }
    129129    public static function settings_input($setting) {
    130         $html = '<input style="width:520px;" placeholder="'.$setting->description.'" type="'.($setting->type=='password'?'password':'text').'" name="'.$setting->id.'" value="'.esc_attr(get_option($setting->id)).'" />';
     130        $html = '<input style="width:520px;" placeholder="'.esc_attr($setting->description).'" type="'.($setting->type=='password'?'password':'text').'" name="'.esc_attr($setting->id).'" value="'.esc_attr(get_option($setting->id)).'" />';
    131131        //$html .= '<div>'.$setting->description.'</div>';
    132132        return self::settings_row($setting, $html);
  • pageapp/trunk/pageapp.php

    r3126398 r3129768  
    44Plugin URI: https://wordpress.org/plugins/pageapp/
    55Description: Extensions to Wordpress wp-json for the PageApp API and mobile framework
    6 Version: 1.3.9
     6Version: 1.4.0
    77Author: PageApp
    88Author URI: https://www.pageapp.com
  • pageapp/trunk/readme.txt

    r3126398 r3129768  
    44Requires at least: 3.0
    55Tested up to: 6.5.4
    6 Stable tag: 1.3.9
     6Stable tag: 1.4.0
    77License: © 2024 Thireen32 Pty Ltd
    88Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=K6VKWB3HZB2T2&item_name=Donation%20to%20jameslow%2ecom&currency_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8
     
    2828
    2929== Changelog ==
     30
     31= 1.4.0 =
     32* Escape more properties in SettingsLib
    3033
    3134= 1.3.9 =
Note: See TracChangeset for help on using the changeset viewer.