我正在处理的网站出现以下验证错误
Line 1, Column 1: non SGML character number 6
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.…
在 FireFox 源代码查看器中,以下行的文本为红色
DOCTYPE
HEAD
META CHARSET
/HEAD
BODY
2 Paragraph tags (that are properly opened and closed.
当我使用 Web 开发人员 FireFox 插件并选择“编辑 HTML”选项时,有一个红点,所有标签都<title>
消失了。也没有正文标签,在 FireFox 源代码查看器中显示为红色的两个段落标签也不见了。换句话说,红色表示某种错误,但我在源代码中看不到任何错误。
此处显示了指示为错误的部分:
<!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" xml:lang="en" lang="en">
<head>
</head>
<body class="page">
<p>
<div class="photo-box photo-box-right" id="photo-box-test-image-619">
<div class="photo-box-photo">
<img src="http://localhost/assets/uploads/images/logo.png" title="Test image" alt="Test image" />
</div>
<div class="photo-box-title">
<span class="photo-box-head" title="Test image">Test image</span>
</div>
</div>
Qualitative data approximates, characterizes or describes but does not measure the attributes, characteristics, properties of a phenomenon. Data could take the form of textual transcriptions of interviews, focus groups or dialogues, photographs, audio and video recordings.
</p>
<p>
<div class="photo-box photo-box-left" id="photo-box-test-image-476">
<div class="photo-box-photo">
<img src="http://localhost/assets/uploads/images/sparta.jpg" title="Test image" alt="Test image" />
</div>
<div class="photo-box-title">
<span class="photo-box-head" title="Test image">Test image</span>
</div>
</div>
Quantitative data defines attributes in terms of values with numerical significance and can be represented as matrixes of numbers of responses, maps, tables or graphs.
</p>
I can not see any errors in the HTML. I see no hidden control characters in any normal editor that I can get my hands on (Notepad++, UltraEdit, Notepad, Wordpad) but I do see it in the "Edit HTML" screen of the Web Developer toolbar.
Here is what I have done to try and resolve this:
- Recreate the file and retyping the supposed affected lines.
- Used various text editors to try and see the wrong file.
- Removed all recently added content and code in the file to see if this stops at any point (no luck...)
- Read all the posts I can find about "non-SGML character" I could find here and on Google, nothing seem to answer my question.
- Deleted the post in the database and recreated that (for incase this is a problem with database content). Not resolved.
- Converted all tables to MyISAM (some, including the content table, were InnoDB)
- Checked if other pages that does not draw its content from the database has the same problem (such as contact form) and it does the same.
- Played around with various character sets and encodings in my database and HTML source, as well as my PHP ini file. None affect the outcome.
- Changed the code page in all my text editors to various types to try and see this hidden non-SGML character.
- Copied all the system and application files (excluding the obvious changes such as CSS and templates and modified modules) over from another site based on the same version of CodeIgniter that works well.
Anything else you think I can do?
From the above, I conclude that either the custom modules (unlikely), the CSS stylesheets, the added jQuery libraries that are different between the sites (uniform.js, buttons.js) or the templates and views used is having some sort of pukefest on my happiness.
Please advise if you can think of something else I have missed...
Thanks!
Kobus
EDIT: Now that I am allowed to add images, I decided to make a few screenshots to explain the problem better. Maybe it helps... I initially thought it may be the whitespace in the title tag, but wasn't that...