Making WordPress.org

Opened 7 years ago

Closed 4 days ago

#4507 closed defect (bug) (worksforme)

Glossary tooltips break HTML markup (take 2)

Reported by: SergeyBiryukov Owned by:
Priority: normal Milestone:
Component: Make (Get Involved) / P2 Keywords: has-screenshots
Cc:

Description

Previously: #4473

On ​https://make.wordpress.org/polyglots/2019/06/02/pte-request-for-kirki/#comment-283767, there's this part of a sentence:

[username] can not be the translation editor for the […] language

The new glossary tooltips interfere with the page, causing invalid markup and display issues:

… can not be the <span tabindex="0" class="glossary-item-container">translation editor<span class="glossary-item-hidden-content"><span class="glossary-item-header">Translation Editor</span> <span class="glossary-item-description">Translation editors can approve translations for projects. The GTE (General Translation Editor) and LM (Locale Manager) roles can add new users with the "Project Translation Editor" role that can approve translations for specific projects.</p>
<p>There are two different Translation Editor roles, see:</p>
<p> 	<a href="#general-translation-editor">General Translation Editor</a><br />
 	<a href="#project-translation-editor">Project Translation Editor</a><br />
<br /><a href="https://make.wordpress.org/polyglots/wp-admin/post.php?post=5951&amp;action=edit">Edit Entry</a></span></span></span> for the <a href="https://make.wordpress.org/polyglots/teams/?locale=uk" class="tag"><span class="tag-prefix">#</span>uk</a> Ukrainian language.

Two issues here:

  • <p> inside <span> is invalid.
  • Extra text is displayed on the page, instead of being in a tooltip.

See the screenshot. Tested in the latest Google Chrome and Microsoft Edge on Windows 10.

Attachments (4)

4507.PNG​ (42.9 KB ) - added by SergeyBiryukov 7 years ago.
Screen Shot 2019-12-03 at 8.59.17 AM.png​ (157.0 KB ) - added by dufresnesteven 7 years ago.
Screen Shot 2019-12-03 at 8.58.40 AM.png​ (241.8 KB ) - added by dufresnesteven 7 years ago.
4507.2.PNG​ (398.1 KB ) - added by SergeyBiryukov 4 years ago.

Download all attachments as: .zip

Change History (8)

#1 follow-ups: @dufresnesteven
7 years ago

Hi @SergeyBiryukov, :)

Is this still an issue? See attached.

#2 in reply to: ↑ 1 @coffee2code
7 years ago

  • Resolution → fixed
  • Status new → closed

Replying to dufresnesteven:

Is this still an issue? See attached.

Closing as fixed since I confirmed that this appears to be functioning properly at the moment.

Seems like ​https://plugins.trac.wordpress.org/changeset/2095178 for #4473 would've been the fix for this, but this is noted as a follow-up ticket. 🤷🏽‍♂️

#3 in reply to: ↑ 1 @SergeyBiryukov
4 years ago

  • Resolution fixed
  • Status closed → reopened

Replying to dufresnesteven:

Is this still an issue?

It looks like the original issue was fixed for that particular glossary entry not via code changes, but instead by editing the ​affected entry to remove any <p> tags, as shown on your screenshots.

This still happens for any other entries that have <p> or <ul> tags, see ​this comment on make/core for example. The ​dev note glossary entry breaks the markup and leaves extra text in the comment, making it incomprehensible.

#4 @obenland
4 days ago

  • Resolution → worksforme
  • Status reopened → closed

Rechecked today: the dev note tooltip on ​https://make.wordpress.org/core/2022/05/27/wordpress-6-0-arturo-retrospective/#comment-43161 now renders as inline text, and no glossary tooltips on the make/core or make/polyglots glossaries contain block-level markup. The glossary plugin strips paragraph and list tags from descriptions before building the tooltip. Closing as worksforme; if a tooltip breaks the markup again, please reopen with a link to the page.

Note: See TracTickets for help on using tickets.