Project

General

Profile

Anomalie #912

escape search input before performing fulltext search

Added by Simon over 1 year ago. Updated over 1 year 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);

Associated revisions

Revision 3500 (diff)
Added by Simon over 1 year ago

fixing bug when having characters like "(" - closing issue #912

History

#1

Updated by Simon over 1 year ago

See `MatchDataFormat()` function

#2

Updated by Simon over 1 year ago

  • Status changed from Nouveau to Fermé
  • % Done changed from 0 to 100

Applied in changeset linea21|r3500.

Also available in: Atom PDF