Icy Phoenix

     
 

SOLVED Problem With Kb Plugin

SOLVED Problem With Kb Plugin

Article
Reply with quote    Download Post  
Post Problem With Kb Plugin 
 
Hello everybody,

I have a problem with the kb plugin that happens when I create/edit an article. The problem is that if the article includes an url with a weird character (it seems that happens only with the "&" character) automatically puts at its side its html code. For example, if my url is "anything&23", appears as "anything&23" and when you click on it, produces the following error:

SQL ERROR [ mysql4 ]

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 '' at line 2 [1064]

SQL

SELECT * FROM ip_kb_categories WHERE category_id =

BACKTRACE

FILE: includes/DB/mysql.php
LINE: 295
CALL: sql_db->sql_error()

FILE: plugins/kb/includes/functions_kb.php
LINE: 157
CALL: sql_db->sql_query()

FILE: plugins/kb/includes/kb_article.php
LINE: 193
CALL: get_kb_nav()

FILE: kb.php
LINE: 61
CALL: include('plugins/kb/includes/kb_article.php')




 
Nayuko - View user's profile Send private message  
Nayuko [ Sat 17 Nov, 2012 16:51 ]
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us


SOLVED Problem With Kb Plugin

Comments
Reply with quote    Download Post  
Post Re: Problem With Kb Plugin 
 
In a simple way,

It's the normal thing for & to be converted to & on $_POST providing it's told to do it - And then on $_GET it converts it back to &.

The variables that handle the posting and getting - need to be cleaned and I don't know where is what with the KB mod, so you'll have to wait for someone else that does.

And in reality, this anything&23 should be written as anything&23



 
mort - View user's profile Send private message  
mort [ Sat 17 Nov, 2012 23:30 ]
Reply with quote    Download Post  
Post Re: Problem With Kb Plugin 
 
Oh, a Steins; Gate fan.

For your problem, I think it needs to get urlencode()d instead of html escaped.
I'll look into it later



 
Informpro - View user's profile Send private message  
Informpro [ Sun 18 Nov, 2012 13:51 ]
Reply with quote    Download Post  
Post Re: Problem With Kb Plugin 
 
i actualy told Nayuko on IP.es to try with BBcode [url] instaed of using html , just for test



 
spydie - View user's profile Send private message  
spydie [ Sun 18 Nov, 2012 14:21 ]
Reply with quote    Download Post  
Post Re: Problem With Kb Plugin 
 
Ah okay, I misread this, thought it was happening with the article URL.
Anyway there's a problem with html escaping.

EDIT : Please try this

I also added, in includes/kb_post.php
Code: [Download] [Hide]
  1.         if ($html_on) 
  2.         { 
  3.             $article_text = htmlspecialchars_decode($article_text); 
  4.         } 
after
Code: [Download] [Hide]
  1. if (!empty($article_text)) 



El psy congroo.



 
Informpro - View user's profile Send private message  
Informpro [ Sun 18 Nov, 2012 14:26 ]
Reply with quote    Download Post  
Post Re: Problem With Kb Plugin 
 
Informpro wrote: [View Post]
Ah okay, I misread this, thought it was happening with the article URL.
Anyway there's a problem with html escaping.

EDIT : Please try this

I also added, in includes/kb_post.php
Code: [Download] [Hide]
  1.         if ($html_on) 
  2.         { 
  3.             $article_text = htmlspecialchars_decode($article_text); 
  4.         } 
after
Code: [Download] [Hide]
  1. if (!empty($article_text)) 



El psy congroo.


Thanks, it works!

wooo! you like Steins;Gate too!! It's a great anime, and Okabe is so cool! xD

"she is so prety, but is a man!"



 
Nayuko - View user's profile Send private message  
Nayuko [ Sun 18 Nov, 2012 16:47 ]
Reply with quote    Download Post  
Post Re: [SOLVED] Problem With Kb Plugin 
 
Thanks for the fix, I'll update GIT with this fix on next commit.



 
Mighty Gorgon - View user's profile Send private message  
Mighty Gorgon [ Sat 24 Nov, 2012 11:57 ]
Display posts from previous:    

HideWas this topic useful?

Post new topic  Reply to topic  Page 1 of 1
 
 




 


 

  cron