Problem with anchors in Safari in Windows

1

Hello, I have two pages, one of them contains an anchor for a section of the other page:

<dsp:a page="${publicUrl}${URLs.club}#ancora" class="veja-mais block">

In this other I have one, which is in the right place where it should be directed.

The problem I'm facing is that when I click the link that contains the anchor, Safari removes the #, so not directing.

I tried to use a section, name, class, but it still does not work.

Does anyone know what it can be? In other browsers it works correctly.

Here are the codes:

Page 1: <dsp:a page="${publicUrl}${URLs.club}#ancora" class="veja-mais block">

Page 2: <div id="ancora"></div>

    
asked by anonymous 26.08.2014 / 15:52

1 answer

1

This is a known Safari issue. The browser removes the anchors in cases of redirects to different pages (more specifically when redirect headers are present).

Removing the redirect does not seem like an option in your case, so I suggest you try replacing:

<dsp:a page="${publicUrl}${URLs.club}#ancora" class="veja-mais block">

by

<dsp:a page="${publicUrl}${URLs.club}/#ancora" class="veja-mais block">

The bar does not interfere with the operation of other browsers, and apparently fixes the problem in Safari.

Source: SOen

    
26.08.2014 / 16:20