Solved

Mysterious artifact "7" in html body tag innerHTML

Posted on 2012-04-01
3
436 Views
Last Modified: 2012-04-02
Recently I noticed a mysterious "7" appearing in the top left corner of my homepage: http://heart2heartshanghai.net/index.cfm but I cannot find a "7" in my CFML code.
In trying to track this down (to remove it), I created a totally empty new page in my site's root: http://heart2heartshanghai.net/index2.cfm -- but the "7" still mysteriously appears!

Firebug shows the HTML of the "empty" page as:
<html>
<head></head>
<body>7 </body>
</html>

Open in new window

and when I inspect the DOM with Firebug I see several references to "7\n" (which I think is the mysterious artefact I want to remove) which I have highlighted in bold:

baseURI
      "http://heart2heartshanghai.net/index2.cfm"
      
childElementCount
      2
      
childNodes
      [head, body]
      
0
      head
      
accessKey
      ""
      
accessKeyLabel
      "^"
      
contextMenu
      null
      
dataset
      DOMStringMap {}
      
isContentEditable
      false
      
onmouseenter
      null
      
onmouseleave
      null
      
onmozfullscreenerror
      null
      
parentElement
      html
      
accessKey
      ""
      
accessKeyLabel
      "^"
      
contextMenu
      null
      
dataset
      DOMStringMap {}
      
isContentEditable
      false
      
onmouseenter
      null
      
onmouseleave
      null
      
onmozfullscreenerror
      null
      
parentElement
      null
      
click
      click()
      
contains
      contains()
      
insertAdjacentHTML
      insertAdjacentHTML()
      
mozRequestFullScreen
      mozRequestFullScreen()
      
attributes
      []
      
length
      0
      
getNamedItem
      getNamedItem()
      
getNamedItemNS
      getNamedItemNS()
      
item
      item()
      
removeNamedItem
      removeNamedItem()
      
removeNamedItemNS
      removeNamedItemNS()
      
setNamedItem
      setNamedItem()
      
setNamedItemNS
      setNamedItemNS()
      
__proto__
      [xpconnect wrapped native prototype] { item=item(), getNamedItem=getNamedItem(), setNamedItem=setNamedItem(), more...}
      
baseURI
      "http://heart2heartshanghai.net/index2.cfm"
      
childElementCount
      2
      
childNodes
      [head, body]
      
0
      head
      
1
      body
      
accessKey
      ""
      
accessKeyLabel
      "^"
      
contextMenu
      null
      
dataset
      DOMStringMap {}
      
isContentEditable
      false
      
onmouseenter
      null
      
onmouseleave
      null
      
onmozfullscreenerror
      null
      
parentElement
      html
      
click
      click()
      
contains
      contains()
      
insertAdjacentHTML
      insertAdjacentHTML()
      
mozRequestFullScreen
      mozRequestFullScreen()
      
aLink
      ""
      
attributes
      []
      
background
      ""
      
baseURI
      "http://heart2heartshanghai.net/index2.cfm"
      
bgColor
      ""
      
childElementCount
      0
      
childNodes
      [<TextNode textContent="7\n">]
      
0
      <TextNode textContent="7\n">
     
parentElement
      body
      
wholeText
      "7\n"

      
contains
      contains()
      
attributes
      null
      
baseURI
      "http://heart2heartshanghai.net/index2.cfm"
      
childNodes
      []
      
constructor
      Text {}
      
data
      "7\n"

      
firstChild
      null
      
lastChild
      null
      
length
      2
      
localName
      null
      
namespaceURI
      null
      
nextSibling
      null
      
nodeName
      "#text"
      
nodeType
      3
      
nodeValue
      "7\n"


Can anyone tell me what is going on -- how the "7" got there, and how do I remove it?
0
Comment
Question by:ShanghaiD
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 17

Accepted Solution

by:
selvol earned 500 total points
ID: 37794549
Try adding this to your application.

<cfscript>
SetEncoding("form","utf-8");
SetEncoding("url","utf-8");
</cfscript>
<cfcontent type="text/html; charset=utf-8">

Selvol
0
 
LVL 7

Expert Comment

by:micropc1
ID: 37794590
You might want to take a look at your Application.cfm or Application.cfc (esp the onRequestStart() method)
0
 

Author Closing Comment

by:ShanghaiD
ID: 37794765
Excellent!  Thank you!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question