Changes for plugins/content/content.cpp: 1 added line, 1 removed line.
Original line number
Diff line number
Diff line
@@ -712,7 +712,7 @@ namespace blogi {
blogi::SQLsql;
blogi::DBResultres;
sql<<"SELECT title,descrition,id FROM content WHERE title @@ to_tsquery('"<<word<<"') OR descrition @@ to_tsquery('"<<word<<"') OR text @@ to_tsquery('"<<word<<"');";
sql<<"SELECT title,descrition,id FROM content WHERE title @@ to_tsquery('"<<sql.escaped(buf,word)<<"') OR descrition @@ to_tsquery('"<<sql.escaped(buf,word)<<"') OR text @@ to_tsquery('"<<sql.escaped(buf,word)<<"');";
Changes for plugins/staticpage/static.cpp: 1 added line, 1 removed line.
Original line number
Diff line number
Diff line
@@ -386,7 +386,7 @@ void blogi::StaticPage::Search(const int tid, const char* word, blogi::SearchRet
blogi::SQLsql;
blogi::DBResultres;
sql<<"SELECT id,url,meta,text FROM static_content WHERE text @@ to_tsquery('"<<word<<"') OR meta @@ to_tsquery('"<<word<<"');";
sql<<"SELECT id,url,meta,text FROM static_content WHERE text @@ to_tsquery('"<<sql.escaped(buf,word)<<"') OR meta @@ to_tsquery('"<<sql.escaped(buf,word)<<"');";