WordPress.org

Ready to get started?Download WordPress

Forums

Table of Contents Plus
[resolved] Problems with apostrophes and quotation marks (6 posts)

  1. esandman
    Member
    Posted 1 year ago #

    I absolutely love this plugin. However, I've had problems with headers that feature apostrophes or quotation marks. The auto-generated URL doesn't work. I've had to remove the ' and " in order to make the anchor URL work. Has anyone else noticed this?

    http://wordpress.org/extend/plugins/table-of-contents-plus/

  2. Mike
    Member
    Plugin Author

    Posted 1 year ago #

    Works for me...

    8.3.3.1 has a '
    http://arpc.gov.au/news-and-publications/annual-reports/2011-12-annual-report/

    2.5 has "
    http://arpc.gov.au/qanda/

    Got a link with the issue? Could be a copy/paste translation from elsewhere? After pasting into WordPress, try deleting the ' and " and inserting it manually with your keyboard.

  3. esandman
    Member
    Posted 1 year ago #

    Thanks Michael. This is an example of a link that's not working for me: http://www.electology.org/approval-voting#Doesnt_Approval_Voting_violate_one_person_one_vote

    You can see it under CONTENTS on the right side of the page.

  4. Mike
    Member
    Plugin Author

    Posted 1 year ago #

    Looks like wptexturize is applied to the content which converts characters like ' to &8217;. I've just updated the widget to do the same which means it will link to the correct anchor.

    Not sure when a new version will come out but if you want to apply the change now, edit toc.php and on line 1498, make it look like:


    $items = $tic->extract_headings( $find, $replace, wptexturize($post->post_content) );

  5. esandman
    Member
    Posted 1 year ago #

    Thanks, I did it but I got this message:

    This plugin has been deactivated because your changes resulted in a fatal error.

    Parse error: syntax error, unexpected '&' in /home/electolo/public_html/wp-content/plugins/table-of-contents-plus/toc.php on line 1498

  6. Mike
    Member
    Plugin Author

    Posted 1 year ago #

    Did you copy/paste the code I gave you? Try typing out the following bit:


    wptexturize($post->post_content)

    That was the only change.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic