Solved

Mysterious artifact "7" in html body tag innerHTML

Posted on 2012-04-01
3
438 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

729 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