Making WordPress.org

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#5572 closed defect (bug) (fixed)

Plugin FAQ anchor links get broken when used in a forum post

Reported by: johnbillion's profile johnbillion Owned by: dd32's profile dd32
Milestone: Priority: normal
Component: Support Forums Keywords:
Cc:

Description

I've noticed that when I copy a URL to a plugin FAQ and paste it in a support forum reply, it gets broken. The copied link is correct and works, it just gets mangled when saved in the forum reply.

Latest example here: https://wordpress.org/support/topic/tracking-user-switching/#post-13898580

This is an affected link, seems to work okay in Trac: https://wordpress.org/plugins/user-switching/#%0Aare%20any%20plugin%20actions%20called%20when%20a%20user%20switches%20account%3F%0A

Change History (5)

#1 @diddledani
4 years ago

The forum is stripping the %0A encoded character at the beginning and end of the fragment in the URL. %0A is the encoded newline character. I think the forum is correct, here, and the fix should be applied to the plugin pages to trim() the FAQ titles before encoding/escaping the URL.

#2 @dd32
4 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 10573:

Plugin Directory: When generating FAQ anchors, don't include trailing whitespace as part of the ID.

This also updates the format of pre-defined ID's to match the format used today, as the ID's were previously being stripped out by kses, there's no real change here.

The Decode/Encode and trimming works around the various different anchor formats used.

Fixes #5572.

#3 @dd32
4 years ago

In 10574:

Plugin Directory: Bump JS cache after [10573].

See #5572.

#4 @ryelle
4 years ago

In 10606:

Plugin Directory: Stop adding a # when generating FAQ IDs in JavaScript.

This keeps the behavior consistent between PHP and JS.

See #5572.

#5 @ryelle
4 years ago

In 10607:

Plugin Directory: Bump JS cache after [10606].

See #5572.

Note: See TracTickets for help on using tickets.