Fixing single quote searching issue. Fixes #27
This commit is contained in:
parent
cc935387cb
commit
cd9fec95b7
|
@ -81,7 +81,7 @@ struct Torrent {
|
|||
fn sql_search(query: &str, size: usize, offset: usize) -> Vec<Torrent> {
|
||||
let stmt_str = format!(
|
||||
"select * from torrents where name like '%{}%' limit {} offset {}",
|
||||
query.replace(" ", "%"),
|
||||
query.replace(" ", "%").replace("\'","''"),
|
||||
size,
|
||||
offset
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue