Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > html tag without <> - is there an alternative?

Reply
Thread Tools

html tag without <> - is there an alternative?

 
 
David Johnstone
Guest
Posts: n/a
 
      04-19-2006
The subject says it all. I'm trying to pipe text through a
process that replaces:-
< with &lt
> with &gt

Now I would like to include html in the text, but because of
this substitution (which I can't do anything about), none of
the html tags are recognised in the output.
Is there perhaps some fiendishly obscure alternative syntax
for coding an html tag? Or does anyone have an idea how
I could circumvent this problem?
Many thanks,
David

 
Reply With Quote
 
 
 
 
Jim Moe
Guest
Posts: n/a
 
      04-20-2006
David Johnstone wrote:
> The subject says it all. I'm trying to pipe text through a
> process that replaces:-
> < with &lt
>> with &gt

> Now I would like to include html in the text, but because of
> this substitution (which I can't do anything about), none of
> the html tags are recognised in the output.
>

Nope, you're screwed. If the process has no method for escaping what it
is replacing, there is nothing you can do.
Perhaps if you gave a few more details like operating system, the
process (if standard), etc.?
And I hope you meant "&lt;" and "&gt;".

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
 
Reply With Quote
 
 
 
 
David Johnstone
Guest
Posts: n/a
 
      04-20-2006
Jim Moe wrote:
> David Johnstone wrote:
> > The subject says it all. I'm trying to pipe text through a
> > process that replaces:-
> > < with &lt
> >> with &gt

> > Now I would like to include html in the text, but because of
> > this substitution (which I can't do anything about), none of
> > the html tags are recognised in the output.
> >

> Nope, you're screwed. If the process has no method for escaping what it
> is replacing, there is nothing you can do.
> Perhaps if you gave a few more details like operating system, the
> process (if standard), etc.?
> And I hope you meant "&lt;" and "&gt;".


Yes, I did meant that, thanks, and thanks also for your input.

This is for a web site where you can provide your own content,
but they don't want html. The way they keep html out is by
making the html server do these substitutions - or maybe directly
sunstituting in the source you provide. So I have no control over
that - all I could do is write some alternative in the source, or at
least I can't think of anything else.
Got to hand it to them - it's a clever and simple way of keeping
html out!

David

 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      04-20-2006
David Johnstone wrote:

> Is there perhaps some fiendishly obscure alternative syntax
> for coding an html tag?


No -- but the particular filter that you're using may have a method of
escaping tags to prevent them from being converted; or it may have a bug
that can be exploited to achieve the same effect.

Without more information from you it's difficult to know.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
David Johnstone
Guest
Posts: n/a
 
      04-20-2006
Toby Inkster wrote:
> David Johnstone wrote:
>
> > Is there perhaps some fiendishly obscure alternative syntax
> > for coding an html tag?

>
> No -- but the particular filter that you're using may have a method of
> escaping tags to prevent them from being converted; or it may have a bug
> that can be exploited to achieve the same effect.
>
> Without more information from you it's difficult to know.


The filter is not under my control (see my other post). It's on a
server I'm using but which I don't administer, so I don't have any
more detailed information about it. It's designed to parse normal
text and produce a result that will look like the original in an html
viewer, so I would imagine anything like e.g. "\>" would have to
view as exactly that in the browser.
It does support it's own primitive markup language with directives
like:-
%cr Red %c*
which would show the word "Red" in red.
Since the results it produces are html (but not my html), I imagine
it could *always* substitute < and > with no escape possibility,
since the results (&gt; and &lt would always view correctly in
a browser. I guess I would do it that way, anyway.
David

 
Reply With Quote
 
Jim Higson
Guest
Posts: n/a
 
      04-20-2006
David Johnstone wrote:

> Yes, I did meant that, thanks, and thanks also for your input.
>
> This is for a web site where you can provide your own content,
> but they don't want html. The way they keep html out is by
> making the html server do these substitutions - or maybe directly
> sunstituting in the source you provide. So I have no control over
> that - all I could do is write some alternative in the source, or at
> least I can't think of anything else.
> Got to hand it to them - it's a clever and simple way of keeping
> html out!


They probably do it for security reasons, to avoid XSS attacks. There might
be sneaky ways round it involving javascript, server-side bugs and browser
corrections, but in general if they don't want you posting HTML that's
their choice.

--
Jim
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error "A form tag with runat=server must exist" but there is a form tag!! André ASP .Net 2 06-23-2008 07:49 AM
Html page without any Html tag in its source lovecreatesbea...@gmail.com HTML 10 07-29-2007 04:51 AM
HTML.Tag.BASE same as HTML.Tag.A carlbernardi@gmail.com Java 1 11-29-2006 03:41 AM
How do I know if there's a certain HTML element in an HTML string (without indexOf)? Gabriella Javascript 5 09-18-2006 06:35 AM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM



Advertisments