473,785 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why does my browser not interpret the escaped HTML tags?

Hello peeplez. I have an odd problem. When I put the ANSI symbol for
"less than" ("<"), the word STRONG and then the ANSI symbol for
"greater than" (">") in my web page, followed by some text, then close
the STRONG tag the same way, my text appears in bold. No problem.

When I do the same things with the corresponding HTML tags (&lt; ,
&gt; ) the tag is not interpreted, it is simply displayed:

<STRONG>text</STRONG>

.... the same thing happens with any tag. What do I have to do to make
my browser (Firefox or Explorer) interpret the tag?

Thank you,
clueless ... I mean syg
Jul 23 '05 #1
18 10515
"Robert Bowen" <sy**@yahoo.com > wrote in message
news:77******** *************** ***@posting.goo gle.com...
Hello peeplez. I have an odd problem. When I put the ANSI symbol for
"less than" ("<"), the word STRONG and then the ANSI symbol for
"greater than" (">") in my web page, followed by some text, then close
the STRONG tag the same way, my text appears in bold. No problem.

When I do the same things with the corresponding HTML tags (&lt; ,
&gt; ) the tag is not interpreted, it is simply displayed:

<STRONG>text</STRONG>

... the same thing happens with any tag. What do I have to do to make
my browser (Firefox or Explorer) interpret the tag?


Don't use the character entities &lt; and &gt; unless you want the '<' and
'>' characters to appear.
Jul 23 '05 #2
Robert Bowen <sy**@yahoo.com > wrote:
Hello peeplez. I have an odd problem. When I put the ANSI symbol for
"less than" ("<"), the word STRONG and then the ANSI symbol for
"greater than" (">") in my web page, followed by some text, then close
the STRONG tag the same way, my text appears in bold. No problem.

When I do the same things with the corresponding HTML tags (&lt; ,
&gt; ) the tag is not interpreted, it is simply displayed:

<STRONG>text</STRONG>

... the same thing happens with any tag. What do I have to do to make
my browser (Firefox or Explorer) interpret the tag?


You need to use

<strong>text</strong>

rather than

&lt;strong&gt;t ext&lt;/strong&gt;

Or am I missing something?
--
Darin McGrew, mc****@stanford alumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp. com, http://www.HTMLHelp.com/

"The world owes you nothing. It was here first." - Mark Twain
Jul 23 '05 #3
On 1 Sep 2004 11:07:52 -0700, Robert Bowen <sy**@yahoo.com > wrote:
Hello peeplez.
Grrr.. :)
I have an odd problem. When I put the ANSI symbol for
"less than" ("<"), the word STRONG and then the ANSI symbol for
"greater than" (">") in my web page, followed by some text, then close
the STRONG tag the same way, my text appears in bold. No problem.
That's correct.
When I do the same things with the corresponding HTML tags (&lt; ,
&gt; ) the tag is not interpreted, it is simply displayed:

<STRONG>text</STRONG>

... the same thing happens with any tag.
That's also correct behavior. &lt; is used to make the UA render <, as an
actual < will be seen as the start of a tag.
What do I have to do to make
my browser (Firefox or Explorer) interpret the tag?


Use < and >.

If you're trying to get around some HTML filter in a web forum, tough
luck, this won't work. &lt; can't ever start a tag, it's a rendered
character.
Jul 23 '05 #4
sy**@yahoo.com (Robert Bowen) wrote:
Hello peeplez. I have an odd problem. When I put the ANSI symbol for
"less than" ("<"), the word STRONG and then the ANSI symbol for
"greater than" (">") in my web page, followed by some text, then close
the STRONG tag the same way, my text appears in bold. No problem.

When I do the same things with the corresponding HTML tags (&lt; ,
&gt; ) the tag is not interpreted, it is simply displayed:

<STRONG>text </STRONG>

... the same thing happens with any tag. What do I have to do to make
my browser (Firefox or Explorer) interpret the tag?

Thank you,
clueless ... I mean syg


First, that's not exactly "escaping". Escaping is preceding a symbol
with something that indicates that it should be interpreted in the
normal way instead of in a special way (or vice-versa, depending on
your poiint of view). You're replacing < and > altogether.

Second, that's what escaping is *for*: to avoid the treatment that
would otherwise be given to some symbol. If you are surprised that
escaping (or, in this case, replacement with entity codes) produces
different treatment, then you were missing the point, and leads to the
question: why were you using &lt; and &gt;, if you wanted the *same*
result as using < and > ?
--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 23 '05 #5
Robert Bowen wrote:
Hello peeplez. I have an odd problem. When I put the ANSI symbol for
"less than" ("<"), the word STRONG and then the ANSI symbol for
"greater than" (">") in my web page, followed by some text, then close
the STRONG tag the same way, my text appears in bold. No problem.

When I do the same things with the corresponding HTML tags (&lt; ,
&gt; ) the tag is not interpreted, it is simply displayed:
Yes, this is as it should be. I do not understand why you thing there
is a problem.
<STRONG>text</STRONG>

... the same thing happens with any tag. What do I have to do to make
my browser (Firefox or Explorer) interpret the tag?

Don't use the escaped values for angle brackets. Escape sequences exist
so that the characters can be displayed rather than interpreted.
--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 23 '05 #6
On 1 Sep 2004 11:07:52 -0700, sy**@yahoo.com (Robert Bowen) wrote:
Hello peeplez.
Hmm...
I have an odd problem.
No, you just need to learn a bit more.
When I put the ANSI symbol...
"ANSI" is not really applicable to the WWW. It comes by the expansion of
the ABBR/ACRONYMS themselves.

ANSI = American National Standards Institute
(USA based in reality).

WWW = World Wide Web (and the 'world' is by magnitudes
bigger than US-America :-)
...for "less than" ("<"), the word STRONG and then the ANSI
symbol for "greater than" (">") in my web page, followed by
some text, then close the STRONG tag the same way, my text
appears in bold. No problem.
That's the "intended default" behavior in user agents, yes.
When I do the same things with the corresponding HTML tags
(&lt; , &gt; ) the tag is not interpreted, it is simply
displayed: <STRONG>text</STRONG>
That's also the intended default behavior in user agents.
... What do I have to do to make my browser (Firefox or
Explorer) interpret the tag?


You need to develop an understanding of the difference between serving
your browser just one single byte of data as represented by e.g. the
characters '<' or '>' as opposed to serving the same browser a series of
four characters as in your example '&lt;' or '&gt;' where the initial
'&' character has a special meaning.

In HTML (and SGML of course) the '&' character directly followed by a
valid 'NAME START' character, and possibly a sequence of valid 'NAME
CHARACTER's, signals to the browser to go into a lookup table and look
for a character replacement for the 'entity' reference just given.

If it can find a replacement character for the '&...' sequence, that's
the character(seque nce) it is supposed to show in display.

I once wrote a page that takes the expansion of entities a little bit
further. You can always try to follow the experiment as I wrote it, and
if you do, I think that you will understand a bit more about entity
references. (i.e. those pesky &whatever; thingies :-)

<http://www.css.nu/markup/markup-entities.html>

Side note: the ending ';' character is not formally required in all
cases either but to keep it safe, just put it in for now will you?
(it is the character sequence between the '&' and the ';' that points
into the entity expansion "look-up table")

All the best...

--
Rex
Jul 23 '05 #7
Jan Roland Eriksson wrote:
WWW = World Wide Web (and the 'world' is by magnitudes bigger than
US-America :-)


Really? The way GW Bush behaves, well, I naturally assumed the world and
the U.S. were synonymous.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 23 '05 #8
In our last episode,
<77************ **************@ posting.google. com>,
the lovely and talented Robert Bowen
broadcast on comp.infosystem s.www.authoring.html:
Hello peeplez. I have an odd problem. When I put the ANSI symbol for
"less than" ("<"), the word STRONG and then the ANSI symbol for
"greater than" (">") in my web page, followed by some text, then close
the STRONG tag the same way, my text appears in bold. No problem. When I do the same things with the corresponding HTML tags (&lt; ,
&gt; ) the tag is not interpreted, it is simply displayed: <STRONG>text </STRONG>
That is exact what is supposed to happen.
... the same thing happens with any tag. What do I have to do to make
my browser (Firefox or Explorer) interpret the tag?


You have to put the tag in literal "<" and ">". The point of have
the character entities &lt; and &gt; is to allow you enter these
characters in text so they *won't* be interpreted as opening and
closing tag symbols.

--
Lars Eighner -finger for geek code- ei*****@io.com http://www.io.com/~eighner/
If it wasn't for muscle spasms, I wouldn't get any exercise at all.
Jul 23 '05 #9
Holy ... ! Man, I didn't intend to start a political conversation! And
certainly didn't mean to offend anyone by writing 'peeplez'. Not sure
why that bothers people but anyway, it was just something I wrote ...
to vary the opening sentence a bit. Sorry ...

Oh yea, and I used the acronym ANSI because in Editplus that's what it
calls it. There is an option -- Edit :: HTML :: HTML to ANSI and ANSI
to HTML. Again, no political intention ...

Now, as to my problem. I don't actually WANT to use these characters
but for some reason when I save certain info in my Oracle database
(saved as a BLOB), when it is displayed on my jsp page, it is spit out
that way. Looking at the database it SEEMS as if it's being saved
"normally", as "<" and ">", and not the HTML symbols. But when it is
displayed, that's what comes out ...

From what you all are saying the browser's job, upon seeing these
tags, is to render them, and that's all. It doesn't care if these
symbols are used to render HTML tags. If it happens to be a "<" or ">"
symbol, so be it, but it won't interpret them.

Ok well ... I wonder why Oracle saves BLOBs that way? It certainly is
annoying. If it saved them "normally" and not as HTML codes I suppose
my text would be displayed as I want it to be ...

Anyway, problem for another day.

Thanks for your responses, and sorry to have annoyed or offended.

syg

Brian <us*****@juliet remblay.com.inv alid> wrote in message news:<cfuZc.100 117$Fg5.8422@at tbi_s53>...
Jan Roland Eriksson wrote:
WWW = World Wide Web (and the 'world' is by magnitudes bigger than
US-America :-)


Really? The way GW Bush behaves, well, I naturally assumed the world and
the U.S. were synonymous.

Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3536
by: bayram guzer | last post by:
hi everybody, i have very strange error. i can not see some of the asp pages on my browser. when i look from view source, all the source is there but browser does not show anything, just an empty page. Does anybody have idea about this ?
11
2030
by: Saqib Ali | last post by:
Please excuse me, this is a fairly involved question that will likely require you to save the file below to a file and open it in a browser. I use Mozilla 1.5, so the problem I describe below should be reproducible with that version at least. BACKGROUND: =========== When you open this page in your browser, you will see a 4 cell table. The cells contain the following items respectively:
2
3728
by: Chris | last post by:
Im hoping someone can help me understand why this works? Requirement: Navigate DOM through javascript to perform DHTML actions. Issue: GIANT html document, up to 4MB in size, thousands and thousands of table rows. What didn't work:
19
9289
by: deko | last post by:
Firefox will not take the following "font-weight:bold" directive in my stylesheet. Works fine in IE. #rightMenuText h5 { font-weight:bold; padding-bottom:0px; padding-top: 10px; margin-bottom:0px; }
15
3327
by: lawrence | last post by:
Is this the correct way to test for a method before I use it? createRange() is, I believe, an IE only method. function wrapSelectionInTag(selection, tag) { if (document.selection.createRange) { var range = document.selection.createRange(); if (range.parentElement() == element) range.text = '<' + tag + '>' + range.text + '<\/' + tag + '>'; }
3
1862
by: Jarod_24 | last post by:
My program (it's a webcrawler) downloads htmlpages and in some cases the html has <script> </script> tags in it that generates parts of the html. How can i interpret this javascript and get the resulting html. Im hoping for something very simple: Dim page as string = downloadWebPage(www.page.com\index.htm) 'raw html Dim newPage as string = interpreter.processScripts(page)
44
2836
by: rhythmace | last post by:
W3C HTML validator passes this: .... <script type="text/javascript" src="foo.js"> <script type="text/javascript"> ....script in here... </script> ....
4
6969
by: liyanage | last post by:
I recently worked on error handling and three related issues/questions came up. 1.) I am trying to trigger Apache ErrorDocument handlers by setting appropriate HTTP status codes in my PHP code, but I don't get the expected results. My PHP file:
4
1939
by: Andy Dingley | last post by:
Another thread <http://groups.google.co.uk/group/alt.www.webmaster/msg/ e7d125cdff1ae2a2> linked to an accessibility checker at this site <http://wave.webaim.org/index.jsp> In their own (unimpressive) code I saw lots of inlined CSS, all beginning with the sequence "/*/*/" <div style="/*/*/background-color:#990000;">
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10357
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10104
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9959
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.