Project

General

Profile

Actions

Anomalie #912

closed

escape search input before performing fulltext search

Added by Simon almost 5 years ago. Updated almost 5 years ago.

Status:
Fermé
Priority:
Normal
Assignee:
Category:
general
Target version:
Start date:
02/01/2020
Due date:
% Done:

100%

Estimated time:
0.50 h
Resolution:

Description

https://stackoverflow.com/questions/26507087/escape-string-for-use-in-mysql-fulltext-search

$search = preg_replace('/[^\p{L}\p{N}_]+/u', ' ', $keyword);
$search = preg_replace('/[+\-><\(\)~*\"@]+/', ' ', $keyword);
Actions

Also available in: Atom PDF