• Resolved dusanvalent

    (@dusanvalent)


    I have a problem with link, is there a way to remove question mark from link when title is an question?
    issue starts after static page is created by external service/hosing, every ToC link that contains ? in the end of href parameter is made into 404 link, and that creates a problem ofc.

    is there maybe a way to rewrite anchor if it contains ? in the end? maybe custom code in fucntions.php?

    or maybe add url encoding for ? to %3F same way it is done for empty space into _ or -?

    any suggestions is welcome

    • This topic was modified 5 years, 4 months ago by dusanvalent.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Steven

    (@shazahm1hotmailcom)

    A question mark is a reserved character and is removed when creating in-page anchors.

    Looking at the links that have a question mark, they all appear in the following format:

    ezTOC does not create links like this. Because of this consistency, I highly suspect another plugin is targeting these links for some reason and rewriting them. I suggest doing a plugin conflict check to find out which it is.

    Thread Starter dusanvalent

    (@dusanvalent)

    that link is created by hosting that creates static pages from WP
    original anchor url is this:
    <a href="#Cosa_sono_i_Bitcoin?" title="Cosa sono i Bitcoin?">Cosa sono i Bitcoin?</a>

    problem is ? at the end as it triggers their internal url rewrite engine, so im looking into way to remove it to avoid that issue from start, and i dont want to change to different toc system as i find this just perfect for our needs.

    (cant provide link to original page)

    • This reply was modified 5 years, 4 months ago by dusanvalent.
    Steven

    (@shazahm1hotmailcom)

    My apologies, the ? was being removed in a previous version, but when the reserved characters list was updated, the ? was accidentally omitted. Please update to the just-released 2.0.15 version. This has added that character back to the reserved character list and should be properly removed.

    Thread Starter dusanvalent

    (@dusanvalent)

    thank you!!!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Remove question mark from anchor link’ is closed to new replies.