Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #23018 > unrolled thread

Under what circumstance would the following superscript and subscript tag not rendered by a web browser?

Started byjustaguy <lichunshen84@gmail.com>
First post2014-02-06 20:09 -0800
Last post2014-02-07 15:08 +0100
Articles 5 — 3 participants

Back to article view | Back to comp.lang.javascript


Contents

  Under what circumstance would the following superscript and subscript tag not rendered by a web browser? justaguy <lichunshen84@gmail.com> - 2014-02-06 20:09 -0800
    Re: Under what circumstance would the following superscript and subscript tag not rendered by a web browser? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-02-07 10:37 +0100
      Re: Under what circumstance would the following superscript and subscript tag not rendered by a web browser? justaguy <lichunshen84@gmail.com> - 2014-02-07 04:20 -0800
        Re: Under what circumstance would the following superscript and subscript tag not rendered by a web browser? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-02-07 14:14 +0100
        Re: Under what circumstance would the following superscript and subscript tag not rendered by a web browser? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-02-07 15:08 +0100

#23018 — Under what circumstance would the following superscript and subscript tag not rendered by a web browser?

Fromjustaguy <lichunshen84@gmail.com>
Date2014-02-06 20:09 -0800
SubjectUnder what circumstance would the following superscript and subscript tag not rendered by a web browser?
Message-ID<f2812355-b2c4-46e3-a6a8-289ff20c0467@googlegroups.com>
Hi,

The following text is a part of data set that is displayed as HTML content (ignore the PRE tag, I want the text to look this way for rendered content / View source code shows them just like that).   What puzzle me is: if I simply display them, both Sup and Sub tags are rendered, however, they are not rendered though the same data if the data is inside some js library like Ext.  (Ext.2). Any thoughts?  Thanks.

<pre>
ok now let's try just two of them and both of them are the last five category. t=8:17pm. 1 /10 and X
<sup>4 </sup>
well make me Y
<sub>2 </sub>
hmm. ok.
</pre>

[toc] | [next] | [standalone]


#23020

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2014-02-07 10:37 +0100
Message-ID<XnsA2CD6C1F3F882eejj99@194.109.133.133>
In reply to#23018
justaguy <lichunshen84@gmail.com> wrote on 07 feb 2014 in
comp.lang.javascript: 

> Hi,
> 
> The following text is a part of data set that is displayed as HTML
> content (ignore the PRE tag, I want the text to look this way for
> rendered content / View source code shows them just like that).   What
> puzzle me is: if I simply display them, both Sup and Sub tags are
> rendered, however, they are not rendered though the same data if the
> data is inside some js library like Ext.  (Ext.2). Any thoughts? 
> Thanks. 
> 
> <pre>
> ok now let's try just two of them and both of them are the last five
> category. t=8:17pm. 1 /10 and X <sup>4 </sup>
> well make me Y
> <sub>2 </sub>
> hmm. ok.
> </pre>

Nonsense.

"rendered though the same data" what does that mean?

Html is html, wether it is renderd by a js script or not.

Please do not talk about unsubstaniated "libraries".
They might change the html.
 
-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#23021

Fromjustaguy <lichunshen84@gmail.com>
Date2014-02-07 04:20 -0800
Message-ID<e435ed7d-f63b-49d8-acc0-cbff5aafee8c@googlegroups.com>
In reply to#23020
On Friday, February 7, 2014 4:37:43 AM UTC-5, Evertjan. wrote:
> justaguy <lichunshen84@gmail.com> wrote on 07 feb 2014 in
> 
> comp.lang.javascript: 
> 
> 
> 
> > Hi,
> 
> > 
> 
> > The following text is a part of data set that is displayed as HTML
> 
> > content (ignore the PRE tag, I want the text to look this way for
> 
> > rendered content / View source code shows them just like that).   What
> 
> > puzzle me is: if I simply display them, both Sup and Sub tags are
> 
> > rendered, however, they are not rendered though the same data if the
> 
> > data is inside some js library like Ext.  (Ext.2). Any thoughts? 
> 
> > Thanks. 
> 
> > 
> 
> > <pre>
> 
> > ok now let's try just two of them and both of them are the last five
> 
> > category. t=8:17pm. 1 /10 and X <sup>4 </sup>
> 
> > well make me Y
> 
> > <sub>2 </sub>
> 
> > hmm. ok.
> 
> > </pre>
> 
> 
> 
> Nonsense.
> 
> 
> 
> "rendered though the same data" what does that mean?
> 
> 
> 
> Html is html, wether it is renderd by a js script or not.
> 
> 
> 
> Please do not talk about unsubstaniated "libraries".
> 
> They might change the html.
> 

Let me rephrase the question.  How do we use Regular Expression to change something like the following while we don't know the "X" and "Y" value, that is, the X could A or B etc, same goes for Y.
X 
<sup>4 </sup> 
to X<sup>4 </sup>
and
Y
<sub>2 </sub>
to Y<sub>2 </sub>
?

Thanks.

[toc] | [prev] | [next] | [standalone]


#23022

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2014-02-07 14:14 +0100
Message-ID<XnsA2CD90E26AEDBeejj99@194.109.133.133>
In reply to#23021
justaguy <lichunshen84@gmail.com> wrote on 07 feb 2014 in
comp.lang.javascript: 

>>> Re: Under what circumstance would the following superscript 
>>> and subscript tag not rendered by a web browser?

... be rendered ... current webbrowser?

Only under the circumstance that the stream is not of the html type.

> Let me rephrase the question.

That is not rephrasing, it is a new Q. And finally on topic.

> How do we use Regular Expression to
> change something like the following while we don't know the "X" and "Y"
> value, that is, the X could A or B etc, same goes for Y. X 

You would need your html to a string a string. 
Regex only works with/on strings.

What is the string you like to use? 
Please show an actual example.

var myString = '....';

What part of the string do you want to replace by what?

This is a tricky task, please answer extensively, 
not just replacing in the example you give, like:

var myString = 'I am just another guy';
var myString = 'I am just this guy';

See then you would not need any regex at all.

> <sup>4 </sup> 
> to X<sup>4 </sup>
> and
> Y
> <sub>2 </sub>
> to Y<sub>2 </sub>
> ?

So not some html, 
html as such can only be manipulated by regex, 
if it is first retrieved and converted to a string value.
And the converted string needs to be reinserted into the html.
The how-to may be left for later. 

Please show a character string.

... and please show what you have tried already. 

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#23023

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2014-02-07 15:08 +0100
Message-ID<1716820.6rFHZLViBW@PointedEars.de>
In reply to#23021
justaguy wrote:

> Let me rephrase the question.  How do we use Regular Expression to change
> something like the following while we don't know the "X" and "Y" value,
> that is, the X could A or B etc, same goes for Y. X <sup>4 </sup>
> to X<sup>4 </sup>
> and
> Y
> <sub>2 </sub>
> to Y<sub>2 </sub>
> ?

We (better) don't.
 
> Thanks.

You're welcome.  Please get a real name and avoid Google Groups.

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web