Ticket #7680 (closed Bug: fixed)

Opened 9 years ago

Last modified 8 years ago

Kupu stripping out anchor to top of current page

Reported by: winn Owned by: duncan
Priority: minor Milestone: 3.0.6
Component: Visual Editor Version:
Keywords: Cc:


Using the Internal Link button to make an anchor to the top of the current page creates code like:

<a title="FREQUENTLY ASKED QUESTIONS" class="internal-link" href="">(back to top)</a>

But upon saving href="" is stripped out.

If you manually add # between the quotes - so href="#" - the href tag is no longer stripped out.

Change History

comment:1 Changed 8 years ago by duncan

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

I can't see anything in the HTML spec which would make this behaviour wrong: there is nothing which says an empty href links to the *top* of a page. However, I agree that this behaviour isn't the friendliest possible so I've changed it and if the 'make links relative' code would result in href="" it now sets it to href="#" instead.

Also fixed a bug which showed up during testing where opening the drawer while an empty href is selected caused an attributeError. SVN revision 51158

Note: See TracTickets for help on using tickets.