0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 


onmouseover="text.show('<br /><b>XXXXXX</b><br />')"

Validation Output: Error:

character "<" is the first character of a delimiter but occurred as data

How can I fix it?

thanks

2 Answers 2

1

Use &gt; and &lt; instead of < and >, respectively.

Alternatively, enclose the code in a <![CDATA[ ... ]]> section.

Sign up to request clarification or add additional context in comments.

1 Comment

Sorry about that, StackOverflow substituted < for &gt;, just like you want. ^_^
1

You can also keep your Javascript in a separate file and include it with <script src="path/to/script.js"></script> and avoid having to escape it at all.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.