Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
digibib
deichman
Commits
106f79e1
Commit
106f79e1
authored
Jun 14, 2021
by
bensinober
Committed by
Benjamin
Jun 16, 2021
Browse files
DEICH-5736
: strip all quotes from autocomplete suggestions before searching
parent
41f10b56
Changes
1
Hide whitespace changes
Inline
Side-by-side
deichman.no/components/Autocomplete/Autocomplete.js
View file @
106f79e1
...
...
@@ -67,7 +67,8 @@ export default class Autocomplete extends React.Component {
onSelect
(
item
,
index
)
{
this
.
props
.
tracker
.
interaction
();
const
label
=
item
.
label
.
replace
(
/"
(
.+
)
"/g
,
'
$1
'
);
// DEICH-5736: strip all quotes from autocomplete suggestions so we don't end up in phrase search(es)
const
label
=
item
.
label
.
replaceAll
(
'
"
'
,
""
);
let
selected
=
label
;
if
(
item
.
typeLabel
===
"
emne
"
)
{
selected
=
`emne:"
${
label
}
"`
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment