TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

[bugtracker] SQL Error when assigning tags to Topic with apostrophe in title.

Started by Touti, November 12, 2009, 01:18:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Touti

SMF Version: 1.1.10
TP Version: 1.0 Beta 4
Theme: Rhino114
Forum Language: French
Bug: The following SQL error occurs when trying to assign a tag to a topic with a single quote character in the title.
Topic Title: Preparation d'un trip Montréal - Lima
Tag: Ouest


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'un trip Montréal - Lima ','tpadmin_topictags','globaltag_item','',0,'Oues' at line 2
Fichier: /home/frenchep/public_html/Sources/TPortalAdmin.php
Ligne: 261



Touti

Here's my temporary fix in case other french admins have the same problem.

In TPortalAdmin.php near line 261 find

$subject = '<span style="background: url('.$settings['tp_images_url'].'/glyph_topic.png) no-repeat;" class="taglink">' . title[0]. '</span>';


and replace with
$subject = '<span style="background: url('.$settings['tp_images_url'].'/glyph_topic.png) no-repeat;" class="taglink">' . str_replace("'","\'",$title[0]). '</span>';



This website is proudly hosted on Crocweb Cloud Website Hosting.