Jump to content
modifiedcontent

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

Recommended Posts

Adding a URL in a textarea field leaves a random ""/>" in my html output, like:

"" />

"

Has anyone else seen something like that?

What could cause this? Turning off experimental HTML OPTIONS did not fix it. 

Share this post


Link to post
Share on other sites

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:

Spoiler

<?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.

Edit:

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?

Share this post


Link to post
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...