I used an apostrophe in my template name and then the template selector box disappeared

Hi,

Great plugin, but I've come across a bug. When I used an apostrophe in a template name, the 'template selector' box no longer appeared on the Sites > Add New page. Template selection was still available from the front end, but the backend no longer offered the box.

This was rectified as soon as I changed the template name to erase the apostrophe; the selection box returned in the back end.

I believe you should be able to use apostrophes in the template names, and so I think this is a bug that could be addressed to improve functionality.

Thanks,

Joss

  • Ignacio
    • HummingBird

    Hi @josswinn .

    Thanks for the notice. It will be fixed in next release. Meanwhile you can apply the change yourself, it's very easy:

    Open wp-content/plugins/blogtemplates/blogtemplatesfiles/blog_templates.php and you'll see the followin line around line no.245:

    $selector .= '<option value="' . esc_attr( $key ) . '" ' . esc_attr( selected( $key == $settings['default'], true, false ) ) . '>' . $value. '</option>';

    Replace it by:

    $selector .= '<option value="' . esc_attr( $key ) . '" ' . esc_attr( selected( $key == $settings['default'], true, false ) ) . '>' . esc_js( $value ). '</option>';

    I just added esc_js for $value variable.

    Regards.
    Ignacio.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.