Jump to content

Adding a URL in a textarea leaves a random ""/>" in my html output


Recommended Posts

I don't think my template code has anything to do with it. Here is a minimal version of the template that still has the same problem:


<?php include 'inc/head.php'; ?>

		<h2><?php echo $page->title ?></h2>
		<?php echo $page->summary ?>
<?php include 'inc/footer.php'; ?>


Not only ""/>" is inserted in the html output. When I add a link to my $page->summary field, all the text after the <a href=...> opening tag is copied (?) and inserted after the body tag with most of the head including <title>. I say copied, because the block of text with URL also appears in the correct place. When I remove the link from 'summary', everything looks as it should, no crap inserted after the body tag.


I found it. I had the following in head:

<meta name="description" content="<?php echo $page->summary; ?>" />

That works fine with plain text, but breaks when you add html like a URL to the summary field. Or is there a proper way to filter it for meta content?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...