Plugin Directory

Changeset 356492


Ignore:
Timestamp:
03/07/2011 07:08:36 AM (15 years ago)
Author:
codeswan
Message:

Fixed a bug that was erasing everything following apostrophes in the input fields.

Location:
recipeseo/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • recipeseo/trunk/readme.txt

    r356231 r356492  
    50501.1 Fixed a bug that was keeping the placeholder image from being replaced with the correct recipe information.
    5151
     521.1.1 Fixed a bug that was erasing everything following apostrophes in the input fields.
     53
    5254== Upgrade Notice ==
    5355
  • recipeseo/trunk/recipeseo.php

    r356057 r356492  
    44Plugin URI: http://fridgg.com/recipeseo
    55Description: A plugin that adds all the necessary microdata to your recipes, so it will show up in Google's Recipe Search
    6 Version: 1.1
     6Version: 1.1.1
    77Author: Allison Day
    88Author URI: http://codeswan.com
     
    102102    $recipe_id = 0;
    103103    if ($post_info) {
    104         $recipe_title = $post_info["recipe_title"];
    105         $summary = $post_info["summary"];
    106         $rating = $post_info["rating"];
    107         $prep_time = $post_info["prep_time"];
    108         $cook_time = $post_info["cook_time"];
    109         $total_time = $post_info["total_time"];
    110         $yield = $post_info["yield"];
    111         $serving_size = $post_info["serving_size"];
    112         $calories = $post_info["calories"];
    113         $fat = $post_info["fat"];
    114         $ingredients = $post_info["ingredients"];
    115         $instructions = $post_info["instructions"];
     104        $recipe_title = htmlentities($post_info["recipe_title"], ENT_QUOTES);
     105        $summary = htmlentities($post_info["summary"], ENT_QUOTES);
     106        $rating = htmlentities($post_info["rating"], ENT_QUOTES);
     107        $prep_time = htmlentities($post_info["prep_time"], ENT_QUOTES);
     108        $cook_time = htmlentities($post_info["cook_time"], ENT_QUOTES);
     109        $total_time = htmlentities($post_info["total_time"], ENT_QUOTES);
     110        $yield = htmlentities($post_info["yield"], ENT_QUOTES);
     111        $serving_size = htmlentities($post_info["serving_size"], ENT_QUOTES);
     112        $calories = htmlentities($post_info["calories"], ENT_QUOTES);
     113        $fat = htmlentities($post_info["fat"], ENT_QUOTES);
     114        $ingredients = array();
     115        for ($i = 0; $i < count($post_info["ingredients"]); $i++) {
     116            $ingredients[$i]["name"] = htmlentities($post_info["ingredients"][$i]["name"], ENT_QUOTES);
     117            $ingredients[$i]["amount"] = htmlentities($post_info["ingredients"][$i]["amount"], ENT_QUOTES);
     118        }
     119        $instructions = htmlentities($post_info["instructions"], ENT_QUOTES);
    116120        if ($recipe_title != null && $recipe_title != '' && $ingredients[0]['name'] != null && $ingredients[0]['name'] != '') {
    117121            $recipe_id = amd_recipeseo_insert_db($post_info);
     
    288292            output += '" />';
    289293           
    290             tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, output);
     294            tinyMCE.execCommand('mceInsertContent', false, output);
    291295            tinyMCE.execCommand('mceCleanup');
    292296        }
    293 
    294         jQuery('.amd-recipeseo-recipe').hide();       
    295         $('.amd-recipeseo-recipe').mouseover( function() {
    296             alert('haloo!');
    297            
    298             return false;
    299         });
    300        
    301        
    302297
    303298    //]]></script>
Note: See TracChangeset for help on using the changeset viewer.