Gravatar for

Question by Arif, Sep 6, 2018 11:23 AM

Remove quotes "" in highlighted text

How to remove "" double quotes in the highlighted text in coveo.

Is it possible through script result template.

<div data-field="{{= coveoFieldName("@title") }}"  data-href-template= '${clickUri}?id=${raw.title}' style="flex-grow: 1; margin-bottom: 5px;"></div>
Gravatar for

Comment by Jean-François L'Heureux, Sep 6, 2018 11:26 AM

Hi Arif,

This website likely stripped the `class` attribute and its value from your code. Could you tell me which was the value of the `class` attribute please?

1 Reply
Gravatar for

Answer by François Lachance-Guillemette, Sep 6, 2018 12:18 PM

By default, Coveo puts the highlighted character in bold, as you can see on our support search: - q=Sitecore

If you inspect the element using Chrome's developer console (F12), you should see the following markup.

See `coveo-highlight`, this is the one responsible for the bold style.

My theory is that you have custom CSS overriding `font-weight`, reverting it back to its default value, then using CSS tricks to add quotes to it instead.

I have replicated your exact behavior by adding this to my styles:

div.coveo-result-cell > a.CoveoResultLink > span.coveo-highlight {
    font-weight: inherit;
span.coveo-highlight:after {
    content: '"';
span.coveo-highlight:before {
    content: '"';
Ask a question