• Resolved tmountjr

    (@tmountjr)


    I noticed that when I use the “more” tag in my posts (version 2.0.3) I lose my XHTML 1.1 validation. I managed to track the problem down – when the post is created the tag is rendered as
    . I’m guessing this should be
    with a space between “a” and “id,” but I don’t know where to find that in the guts of the system to change, or even if that is truly a problem. For an example, compare the main blog page (https://www.mountyscorner.com/blog) with the “Just a test” page (https://www.mountyscorner.com/blog/2006/07/26/just-a-test/). One validates, the other doesn’t because of that aid thing.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter tmountjr

    (@tmountjr)

    Oops. Bad formatting. Boiled down:

    what <!--more--> renders as: <aid="more-x">
    what it should render as: <a id="more-x">

    Perhaps you can mark this and some of your other posts resolved?

    Yosemite: it’s not resolved. They were just fixing the formatting of the original post, although the edit button is usually used for that…

    Anyway, I cannot reproduce this. <a id="more-x"> is what appears on my blog.

    Do you have a plugin installed that could be breaking this?

    Thread Starter tmountjr

    (@tmountjr)

    Didn’t think to check plugins. Looks like the link indication plugin is doing this. In a nutshell it goes through links and determines whether or not a link is pointing to an internal or external site, then gives the link a class. I’m not very handy with regular expressions…this is the line:

    $pattern = '/<a (.*?)(href=("|')(.*?)("|')(.*?)|)>(.*?)</a>/i';

    Anyone have a quick guess how to modify it to ignore <a id>?

    Thread Starter tmountjr

    (@tmountjr)

    Sorry to keep popping up, but I think I found it – the plugin was picking a link string apart using regular expressions, and if it didn’t meet certain criteria (like no href), it would piece it back together again. Only when it pieces it back together, it apparently didn’t put the spaces in properly – it was putting the link contents in using '<a' . $matches[1] – I just changed that line (111 in version 2.6 of the plugin) to '<a ' . $matches[1] and it seems to work. I don’t think this’ll break anything else, so if anyone else has problems with this plugin, check that.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘<!–more–> tag doesn’t validate’ is closed to new replies.