Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
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')

 



 
NayukoSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
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
 



 
mortSend private message  
Back to topPage bottom
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
 



 
InformproSend private message  
Back to topPage bottom
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
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
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.
 



 
InformproSend private message  
Back to topPage bottom
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!"
 



 
NayukoSend private message  
Back to topPage bottom
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.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
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


  

 

  cron