473,394 Members | 1,658 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Reverse Solidus (Backslash) Necessary?

I am using strict HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
in my website. validator.w3c.org gives me lots of errors within my javascript code, such as:
'<B>a</B>...Line 24, Column 40: end tag for element "B" which is not open'

The validator does not recognize the start tag <B>, just the end tag </B>.

I have 4 possible fixes for this problem:
1. Back off to the provisional HTML (but why bother? - browsers work just fine with my code.)
2. Add the reverse solidus (backslash \) to the javascript end tags by replacing </ with <\/ in the javascript portions of my HTML (javascript treats "\/" just like "/". I'm not eager to do this - I have hundreds of pages of code, and I mix HTML with javascript on the same pages.)
3. Put the javascript in a separate file (again , I don't want to do this because of all the extra work.)
4. Ignore the validation errors (isn't this just a result of a buggy validator not recognizing the start tags?)

Is there a downside to ignoring the validation errors? Please let me have your thoughts.
Feb 8 '12 #1
1 1645
Dormilich
8,658 Expert Mod 8TB
validator.w3c.org gives me lots of errors within my javascript code, such as:
'<B>a</B>...Line 24, Column 40: end tag for element "B" which is not open'
then it's best to move the script to an external file and include it. this way it is never touched by the HTML parser/validator.
Feb 8 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

35
by: Raymond Hettinger | last post by:
Here is a discussion draft of a potential PEP. The ideas grew out of the discussion on pep-284. Comments are invited. Dart throwing is optional. Raymond Hettinger ...
3
by: Terry Asher | last post by:
The following script does NOT escape the Apostrophe. Meaning when you mouseover the image the Alt tag says this: DMACC, It and then it stops. <SCRIPT Language="JavaScript"> var pos = "DMACC,...
11
by: Neo | last post by:
Hi Frns, Could U plz. suggest me how can i reverse a link list (without recursion)??? here is my code (incomplete): #include<stdio.h>
10
by: zahy[dot]bnaya[At]gmail[dot]com | last post by:
Hi, I am trying to come up with a c style string reverser, I want it to take 1 argument Altough I would never do this in real life. Is there a way to do it? I wrote this function that fails : ...
19
by: Alan J. Flavell | last post by:
The story so far: on somewhat unrelated newsgroup, my attention fell upon the URL: http://www.speedtouchdsl.com/prod706.htm which contains a link to the purported URL:...
41
by: rick | last post by:
Why can't Python have a reverse() function/method like Ruby? Python: x = 'a_string' # Reverse the string print x Ruby: x = 'a_string' # Reverse the string
1
by: =?ISO-8859-1?Q?Tor_Erik_S=F8nvisen?= | last post by:
Hi, How can I transform b so that the assertion holds? I.e., how can I reverse the backslash-replaced encoding, while retaining the str-type? '\\xe6' Traceback (most recent call last):...
7
by: Gui | last post by:
Hi folks, I have unpacked an all-in-one exe produced by InstallShield. I've made the necessary changes and now I'm ready to repack the files. How can I do that? Which program should I use? ...
1
by: Chris Rebert | last post by:
On Thu, Oct 2, 2008 at 8:07 PM, David Di Biase <dave.dibiase@gmail.comwrote: Rather than defining a comparison function here (which is less efficient), you can use the 'key' argument, which...
4
nithinpes
by: nithinpes | last post by:
I will boil down my exact requirement to this: I should print out lines that do not contain semi-colon, backslash and closing parentheses. The following one -liner works fine. perl -ne "unless(//)...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.