diff --git a/server/service/src/main.rs b/server/service/src/main.rs index 2689706..78635d7 100644 --- a/server/service/src/main.rs +++ b/server/service/src/main.rs @@ -81,7 +81,7 @@ struct Torrent { fn sql_search(query: &str, size: usize, offset: usize) -> Vec { let stmt_str = format!( "select * from torrents where name like '%{}%' limit {} offset {}", - query.replace(" ", "%"), + query.replace(" ", "%").replace("\'","''"), size, offset );