Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

(AC) (BUG) Sanitize Parameters update from 2.2


sportstolen

Recommended Posts

Hi!

 

Here i am in the last step of this update.

 

I have seo urls installed so my question is if i can add this "$page = tep_output_string($page);" to my html_output without breaking the function?

 

 

catalog/includes/functions/html_output.php


@@ -15,6 +15,8 @@
  function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
 global $request_type, $session_started, $SID;

+	$page = tep_output_string($page);
+
 if (!tep_not_null($page)) {
   die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');
 }

 

My snippet from that area

 

// Ultimate SEO URLs v2.2d
// The HTML href link wrapper function

function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
  global $seo_urls;			  
  if ( !is_object($seo_urls) ){
if ( !class_exists('SEO_URL') ){
 include_once(DIR_WS_CLASSES . 'seo.class.php');
}
global $languages_id;
$seo_urls = new SEO_URL($languages_id);
  }
  // AJAX Addto shopping_cart - Begin
							$link_ajax = '';
							if( tep_not_null($parameters) && preg_match("/buy_now/i", $parameters) && $page != 'ajax_shopping_cart.php'){
							  $link_ajax = '" onclick="doBuyNowGet(\'' . tep_href_link( 'ajax_shopping_cart.php', $parameters, $connection, $add_session_id, $search_engine_safe) . '\'); return false;';
							}
  return $seo_urls->href_link($page, $parameters, $connection, $add_session_id) . $link_ajax;
}

 

Thank you

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...