Jump to content

HTML Error Help


Recommended Posts

Hi

I am trying to insert some HTML into the category description part of a page.

 

This is a form from allforms.

This is the HTML

 

<div align="center">
<form name="afm_form_f84b60ce" id="afm_form_f84b60ce" action="http://plus.allforms.mailjol.net/u/f84b60ce.php" method="POST" style="margin: 0px">
<table border="0" cellpadding="6" cellspacing="0" style="text-align: left; border: 4px solid #7090B0; border-collapse: collapse" width="1%" bgcolor="#F0F0F0"><tr>
<td colspan="2" bgcolor="#7090B0" style="font-size: 14px; font-family: Verdana; color: #FFFFFF; font-weight: bold; padding: 4px">Alternatorsnstarters - Quick Quote</td>
</tr><tr>
<td colspan="2" style="padding: 8px; font-size:11px; font-family: Verdana; color: #000000">Questions marked by * are required.</td>
</tr><tr>
<td width="1%"  style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">1.</td>
<td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold;  padding-right: 20px; color: #000000">Email: *<br><input type="Text" name="Email:" size="49" style="font-size: 11px; font-family: Verdana"></td>
</tr><tr>
<td width="1%"  style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">2.</td>
<td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold;  padding-right: 20px; color: #000000">Registration No *<br><input type="Text" name="Registration No" size="49" style="font-size: 11px; font-family: Verdana"></td>
</tr><tr>
<td width="1%"  style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">3.</td>
<td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold;  padding-right: 20px; color: #000000">Delivery Address<br><textarea rows="4" cols="49" style="font-size: 11px; font-family: Verdana" name="Delivery Address"></textarea></td>
</tr><tr>
<td width="1%"  style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">4.</td>
<td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold;  padding-right: 20px; color: #000000">Part Required *<br><select style="font-family: Verdana; font-size: 11px" size="1" name="Part Required"><option value="" selected>-</option><option>Alternator</option><option>Starter Motor</option><option>Air Con Compressor</option><option>Regulator</option><option>Solenoid</option></select></td>
</tr><tr>
<td width="1%"  style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">5.</td>
<td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold;  padding-right: 20px; color: #000000">Part Number if Known<br><input type="Text" name="Part Number if Known" size="49" style="font-size: 11px; font-family: Verdana"></td>
</tr><tr>
<td colspan="2" align="center" style="padding: 8px"><input type="submit" name="submit" value="Submit" style="font-size: 11px; font-family: Verdana">  <input type="reset" name="reset" value="Reset" style="font-size: 11px; font-family: Verdana"></td>
</tr>
</table></form>
</div>

 

I get this error

 

Property Category->description is not valid

 

Does anyone know how to fix this.

 

 

 

Link to comment
Share on other sites

this is your function:

   public static function isCleanHtml($html, $allow_iframe = false){ return true;}
            {
                    $events = 'onmousedown|onmousemove|onmmouseup|onmouseover|onmouseout|onload|onunload|onfocus|onblur|onchange';
                    $events .= '|onsubmit|ondblclick|onclick|onkeydown|onkeyup|onkeypress|onmouseenter|onmouseleave|onerror|onselect|onreset|onabort|ondragdrop|onresize|onactivate|onafterprint|onmoveend';
                    $events .= '|onafterupdate|onbeforeactivate|onbeforecopy|onbeforecut|onbeforedeactivate|onbeforeeditfocus|onbeforepaste|onbeforeprint|onbeforeunload|onbeforeupdate|onmove';
                    $events .= '|onbounce|oncellchange|oncontextmenu|oncontrolselect|oncopy|oncut|ondataavailable|ondatasetchanged|ondatasetcomplete|ondeactivate|ondrag|ondragend|ondragenter|onmousewheel';
                    $events .= '|ondragleave|ondragover|ondragstart|ondrop|onerrorupdate|onfilterchange|onfinish|onfocusin|onfocusout|onhashchange|onhelp|oninput|onlosecapture|onmessage|onmouseup|onmovestart';
                    $events .= '|onoffline|ononline|onpaste|onpropertychange|onreadystatechange|onresizeend|onresizestart|onrowenter|onrowexit|onrowsdelete|onrowsinserted|onscroll|onsearch|onselectionchange';
                    $events .= '|onselectstart|onstart|onstop';
     
                    if (preg_match('/<[\s]*script/ims', $html) || preg_match('/('.$events.')[\s]*=/ims', $html) || preg_match('/.*script\:/ims', $html))
                            return false;
     
                    if (!$allow_iframe && preg_match('/<[\s]*(i?frame|form|input|embed|object)/ims', $html))
                            return false;
     
                    return true;
            }

it's wrong.

 

use only this:

 public static function isCleanHtml($html, $allow_iframe = false){ 
return true;
}
Link to comment
Share on other sites

Its up and running. Just one last thing my friend.

 

The form is there but it only shows half of it and there is a link underneath that says (more) and you have to press this to view the entire form.

Do you know how to get rid of this so when the page loads the entire form is viewable

Link to comment
Share on other sites

×
×
  • Create New...