Solved

Mysterious artifact "7" in html body tag innerHTML

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now