HelpHub icon indicating copy to clipboard operation
HelpHub copied to clipboard

Jump links contain superflous unicode characters

Open Zodiac1978 opened this issue 3 years ago • 7 comments

Simplify jump links by removing such characters

For example on https://wordpress.org/support/article/settings-discussion-screen/ we have these jump links:

https://wordpress.org/support/article/settings-discussion-screen/#email-me-whenever%ef%bb%bf https://wordpress.org/support/article/settings-discussion-screen/#before-a-comment-appears%ef%bb%bf https://wordpress.org/support/article/settings-discussion-screen/#comment-moderat%ef%bb%bfion%ef%bb%bf

Looks like this is a ZERO WIDTH NO-BREAK SPACE https://www.fileformat.info/info/unicode/char/feff/index.htm

Also known as BOM: https://en.wikipedia.org/wiki/Byte_order_mark

I don't think it is useful or intended here and therefore should be removed to simplify those jump links.

I haven't checked any other pages, but maybe the problem is on more helphub pages.

Zodiac1978 avatar May 16 '21 19:05 Zodiac1978

@Zodiac1978

These links in the TOC were automatically generated from the content by Plugin. The plugin generates the link based on the heading texts in the content. So, some lines must have those characters at the end of each line.

But, problem is those characters are invisible and no way to find it nor fix it.

For this article 'Settings Discussion Screen', I could remove those characters by re-typing heading lines and saving the document. I won't check every TOC, but 'll do the same things when I noticed those characters.

Thanks.

atachibana avatar Aug 22 '21 12:08 atachibana

Hi @atachibana

I think it would be a better approach to convert these spaces to normal ones in the TOC plugin instead of doing it manually.

All the best Torsten

Zodiac1978 avatar Aug 23 '21 06:08 Zodiac1978

@Zodiac1978 Yes, it should be so.

@Kenshino Do you know who is the owner of TOC plugin? We'd like to ask to modify

  • When it generates the link that includes '%ef%bb%bf' a the end of it, take it away.

atachibana avatar Aug 24 '21 00:08 atachibana

I think we built it.

@carl-alberto did it.

Kenshino avatar Sep 01 '21 11:09 Kenshino

@atachibana feel free to modify, unfortunately I don't have bandwidth mo modify at the moment :(

carl-alberto avatar Sep 01 '21 11:09 carl-alberto

@carl-alberto @Kenshino If you point me to the correct location I can (hopefully) provide a patch to fix this in the plugin.

Zodiac1978 avatar Sep 01 '21 11:09 Zodiac1978

Here you go @Zodiac1978 ;) https://github.com/WordPress/HelpHub/tree/master/plugins/support-helphub/inc/table-of-contents-lite

Kenshino avatar Sep 01 '21 11:09 Kenshino