Changeset 672


Ignore:
Timestamp:
11/22/2011 09:48:15 PM (6 months ago)
Author:
ofer
Message:

Cross your t's and dot your i's

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/WordPress/plugin/transposh/transposh.php

    r669 r672  
    12061206        $sl = 'auto'; 
    12071207        if (isset($_GET['sl'])) $sl = $_GET['sl']; 
    1208         $q = @urlencode($_GET['q']); 
     1208        $q = urlencode(stripslashes($_GET['q'])); 
    12091209        if (!$q) return; // avoid unneeded curling 
    12101210        $url = 'http://translate.google.com/translate_a/t?client=a&q=' . $q . '&tl=' . $tl . '&sl=' . $sl; 
     
    12611261            list($source, $trans) = $this->database->fetch_translation($p, $tl); 
    12621262            if (!$trans) { 
    1263                 $q .= '&q=' . urlencode($p); 
     1263                $q .= '&q=' . urlencode(stripslashes($p)); 
    12641264            } else { 
    12651265                // holds cached results 
     
    13291329            for ($j = 0; $j < $i; $j++) { 
    13301330                if (!isset($r[$j])) { 
    1331                     $_POST["tk$k"] = transposh_utils::base64_url_encode($_GET['q'][$j]); // stupid, but should work 
     1331                    $_POST["tk$k"] = transposh_utils::base64_url_encode(stripslashes($_GET['q'][$j])); // stupid, but should work 
    13321332                    $_POST["tr$k"] = $jsonout->results[$j]; 
    13331333                    $k++; 
Note: See TracChangeset for help on using the changeset viewer.