Skip to content

Commit 00d5fd8

Browse files
author
chrschw
authored
[TASK] replacing special chars
Added comment about replacing special chars wich results in an error.
1 parent 3e34ea5 commit 00d5fd8

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,12 @@ The plugin comes with a controller that can be reached like this per default, us
105105
It expects the search term as a parameter named `q` (as defined in `AjaxSearch.fusion`). This controller
106106
renders the search results and returns them as HTML without any of the page template. It can therefore
107107
be used to request search results via AJAX and display the result by adding it to the DOM as needed.
108+
109+
## Remove special chars from search term
110+
111+
You might not need special chars to prevent search result erros. Some chars are reserved and you can replace them before rendering the search results.
112+
113+
prototype(Flowpack.SearchPlugin:Search) {
114+
searchTerm = ${request.arguments.search}
115+
searchTerm.@process.removeSpecialChars = ${String.pregReplace(value, "/[^a-zA-Z0-9äöüÄÖÜß]/", "")}
116+
}

0 commit comments

Comments
 (0)