[resolved] Validator chokes on slug code (12 posts)

  1. kimijye
    Posted 8 years ago #

    The html & css validators are choking on text automatically generated by the "slug" code:

    Line 178, character 114:
    ... ur-email-belong-to-you/&title=Does your email belong to you? ...
    Warning: reference not terminated by refc delimiter

    I'd like my xhtml documents to validate. I'd also like to be able to check my css file remotely, which is impossible now, as the css validator won't move beyond the error to review my stylesheet.

  2. Kafkaesqui

    Posted 8 years ago #


    That is not a default url component of WordPress. Are you running a plugin that generates this? Or perhaps your theme template is a little buggy.

  3. kimijye
    Posted 8 years ago #

    This is entirely possible. I'm using the default template in 2.0.5 which I've modified quite a bit - but I didn't modify the line in question. And it is the case that this line refers to slug code which was automatically generated from the backend admin area.

    What do I need to show to get help learning how to resolve this?


  4. The error is actually coming from the "ADD to del.icio.us" link at the foot of the page:

    <a href="http://del.icio.us/post?url=http://blog.kim.thewei.com/2006/12/23/does-your-email-belong-to-you/&title=Does your email belong to you?">ADD to del.icio.us</a>

    You need to look at whatever you're using to insert that. If it's something you've put into your footer, try changing the & to &amp;

  5. kimijye
    Posted 8 years ago #

    The illegal character is being automatically generated. I've tried to figure out how to fix this but no joy. Is there something I can change in the code or in my htaccess file to correct the output that's generating the illegal character?

    <p><?php the_time('l, F jS, Y') ?> at <?php the_time() ?></p>
    <p>CATEGORY <?php the_category(', ') ?></p>
    <p><a href="feed:<?php bloginfo('rss2_url'); ?>">RSS</a>&nbsp;&nbsp;|&nbsp;&nbsp;
    <a href="feed:<?php bloginfo('comments_rss2_url'); ?>">Comment Feed</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="<?php trackback_url(true); ?>" rel="trackback">Trackback&nbsp;&nbsp;|&nbsp;&nbsp;
    <a href="http://del.icio.us/post?url=<?php the_permalink(); ?>&title=<?php the_title() ?>">Add to del.icio.us</a></p>

  6. moshu
    Posted 8 years ago #

    If you don't put your code in between backticks [`] as it is instructed below... everything becomes useless here because it renders.

  7. kimijye
    Posted 8 years ago #

    Thanks for explaining those instructions to me. I've done all kinds of searches in the last 1/2 hour trying to figure out how to get my code to read.

  8. moshu
    Posted 8 years ago #

    1. As LesBessant explained above - the culprit is the & in that code.
    1a. He also gave you the solution. Did you try it?
    2. You said: it is generated. By what? By the code you posted above? - If yes, see 1a.

  9. kimijye
    Posted 8 years ago #

    I have tried it and a dozen other possible solutions ; < . I just tried it once again and got the same error message. The problem seems to be that the illegal character is not being escaped properly.


  10. moshu
    Posted 8 years ago #

    I don't think so...
    Just tried your code on a test install and it works, IF you replace the & with &amp; - i.e.

  11. kimijye
    Posted 8 years ago #

    I was modifying the wrong file - the single.php instead of footer.php. When I changed the footer file and uploaded it, the page did work. Thanks for sticking with me to help me resolve this error. Both files needed to be changed in any event . . . Now they're both correct . . .

  12. vkaryl
    Posted 8 years ago #

    Maybe mark this resolved then, thanks?

Topic Closed

This topic has been closed to new replies.

About this Topic