How can avoid to HTML code will be visualized in a search?

I`m working in the Confluence 4.0 and the HTML plugin, to put an HTML code in the content of a website what I`m doing now.
But, when I looking for the title in the page, which I m developed, it shows like a result of the search, the HTML code like content of the page.

I`m attaching you a picture, and you will see.
Thank you very much!

2 answers

0 votes

You can't, easily. You're poking in raw html which is plain strings as far as confluence is concerned, so it's indexing and displaying what you've put in.

If you want it formatted differently in the searches then you've got three basic paths you can take

  1. Enter it in Confluence format (i.e. not html)
  2. Hack the html macro so it drops the html and stores it as confluence format
  3. Hack the search so that it knows to display html rendered as text

If you can, use jquery to add the html when the page is displayed. Then, just the representation of the page is changed, not what is stored, and searched.

Depends exactly what you are using {html} for really.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,310 views 93 8
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you