Why confluence change ">" sybol in HTML part of page into ">" and how to avoid it?

Vladislav Gryn July 10, 2017

Hi all.
I am trying to add drop down menu in Confluence page but drop down functionality does not work because when I check .css markup of page in Google Chrome developer tools I noticed that instead of ">" sign there was ">" group of signs. If I change it back into ">" in HTML Chrome developer tool my drop down menu work perfectly. Unfortunately when I refresh the page you will get the same error.
In case of using source editor application you will not be able to see ">" group of signs.
How to avoid this difficulty and make my drop down menu work?
Functionality of the menu is written in .css.
Error.jpg

2 answers

0 votes
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 12, 2017

It seems like there is a "bug" in the CSS Macro from Adaptavist (not so much of a bug as a security measure by Atlassian I would assume). Here are some possible workarounds:

  • Enable the HTML Macro and include your CSS there instead (inside of <style> tags).
  • if you are sure that ul will be the only direct children of li:hover, just replace "> ul" with ":nth-child(n)", which should select all direct children and won't be changed in the macro evaluation process.

 

Vladislav Gryn July 12, 2017

Hi Stephen. Thank you a lot for your answer!
I tried to activate using HTML macro, but I could not.

According to documentation I should " Choose the cog icon at top right of the screen --> then choose Confluence Admin. -->Select 'Plugins' in the left-hand panel. This will display the installed plugins active for this Confluence installation.
--> Click' 'HTML macros', then click 'Enable Plugin'."

Unfortunately there is no such menu. I have found the following menus Choose the cog icon -->Add-ons --> In the manager of add-ons I selected All add-ons --> I tried to find HTML macros but there is no such option.


When I try to type {HTML} to add there <style> and CSS code in document body well it does not works. The code and {HTML} are displayed as a text.


Could you please tell me how to enable HTML Macro?

Or in cloud version they are disabled?

By the way, additional great thanks for advising me to use :nth-child(n) now my menu work perfectly!))

0 votes
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 11, 2017

How are you inserting the CSS into the page? Custom CSS? User Macro? Custom HTML?

Vladislav Gryn July 11, 2017

I used macro "Style" and then added CSS markup.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events