Bug In Links.js.php


Subject: Bug In Links.js.php
hile, neighbours and friends...

I've realized that if the name of a defined link has an apostrophe in it (like in Lilja's Library) The html file generated by the liks.js.php file is corrupted, as this program doesn't use stripslashes function...

To fix it:

Open links.js.php

Find
Code: [Download] [Hide] [Select]
$links_logo .= (''<a href="' . append_sid("links.$phpEx?action=go&link_id=" . $row['link_id']) . '" target="_blank"><img src="' . $row['link_logo_src'] . '" alt="' . $row['link_title'] . '" width="' . $site_logo_width . '" height="' . $site_logo_height . '" border="0" hspace="1" /></a>',' . "n");


Replace with
Code: [Download] [Hide] [Select]
$link_title == stripslashes ($row[link_title]);
$links_logo .= (''<a href="' . append_sid("links.$phpEx?action=go&link_id=" . $row['link_id']) . '" target="_blank"><img src="' . $row['link_logo_src'] . '" alt="' . $link_title . '" width="' . $site_logo_width . '" height="' . $site_logo_height . '" border="0" hspace="1" /></a>',' . "n");


That's the way I fixed in my forum. Don't know if it's a good solution, but it works, so I would like to know the opinion of an expert in php programming to see if there's any better way to do that!

Greetz!!

Subject: Re: Bug In Links.js.php
Thank you, I've fixed it.


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.2018s (PHP: 8% SQL: 92%)
SQL queries: 13 - Debug Off - GZIP Enabled