Hi,

Why are these tags appearing in the Comment field of the comment form?:

<html><head></head><body /></html>

and how do I get rid of them?

Thanks!

Kevin

Comments

vm’s picture

all comments ? one comment ?

any chance you can post a link to your site so we can investigate ?

kjshaw’s picture

These tags show up in the otherwise empty "Comment:" field on the comment form after clicking "add new comment".

This seems to be new. I have another site running off the same codebase (seperate db) that does not put these tags in every comment. I've been mucking around with HTMLArea trying to hide it. These started showing up tonight after I hid HTMLArea on the comment form.

Current HTMLArea settings:

Show on all pages except:

admin*
node/add/forum*
comment*

The two sites are set up exactly the same. One displays the behavior, one does not. Too wierd.

kjshaw’s picture

It was vestigial HTML from HTMLArea popping up in my account>>edit>> Signature.

It seems that if you save a form with HTMLArea enabled (regardless of whether you added any text), then disable HTMLArea, the "base code" remains in the field. It left these wrapper tags in my signature which was then appended to my comments.

Cripes!

akany’s picture

Any solution yet?

kjshaw’s picture

Akany,

I've switched to TinyMCE and and using php for visibility. Here's some example code for v4.7.6:

<?php
$match = FALSE;

/* this section controls visibility on EXISTING content */

$types = array('blog' => 1, 'event' => 1 , 'story' => 1, 'book' => 1, 'page' => 1);
if (arg(0) == 'node' && is_numeric(arg(1))) {
$nid = arg(1);
$node = node_load(array('nid' => $nid));
$type = $node->type;
if (isset($types[$type])) {
  $match = TRUE;
}
}

/* this section controls visibility on NEW content */

if (strpos(request_uri(),"node/add/blog"))
{ $match = TRUE;}
if (strpos(request_uri(),"node/add/book"))
{ $match = TRUE;}
if (strpos(request_uri(),"node/add/page"))
{ $match = TRUE;}
if (strpos(request_uri(),"node/add/story"))
{ $match = TRUE;}
if (strpos(request_uri(),"node/add/event"))
{ $match = TRUE;}


return $match;
?>

Set to "Show only if..." and you can add to the lists for exactly which types of content you want to add and edit with the WYSIWYG editor.