On May 12, 4:43=A0am, Thomas 'PointedEars' Lahn <PointedE...@[EMAIL PROTECTED]
>
wrote:
> Rauan Maemirov wrote:
> > I tried to do it myself, but all I did is to replaced
>
> > <object width=3D"425" height=3D"355"><param name=3D"movie"
value=3D"URL"=
></
> > param><param name=3D"wmode" value=3D"transparent"></param><embed
src=3D"=
URL"
> > type=3D"application/x-shockwave-flash" wmode=3D"transparent"
width=3D"42=
5"
> > height=3D"355"></embed></object>
>
> > with
>
> > <object width=3D"425" height=3D"355"><param name=3D"movie"
value=3D"URL"=
></
> > param><param name=3D"wmode" value=3D"transparent"></param><img
src=3D"UR=
L"
> > type=3D"application/x-shockwave-flash" wmode=3D"transparent"
width=3D"42=
5"
> > height=3D"355"></embed></object>
>
> 1. My tests indicate that a Flash movie is not played by an `img'
element,=
> =A0 =A0so replacing the object-embed element combination would be
futile, =
even
> =A0 =A0though the `embed' element is proprietary (and therefore not
Valid)=
..
>
> 2. Using client-side scripting to correct markup is the wrong approach
> =A0 =A0as it does not need to be available.
>
> 3. If necessary, you should rewrite the editor instead.
>
> 4. FWIW, in Eclipse I would have used the following parameters:
>
> Search for:
>
(?s)<object\s+.*?<embed\s+.*?(src=3D".+?")[^>]*?\s+(width=3D.+?>)</embed><=
/object>
>
> Replace with:
> <img $1 $2 alt=3D"">
>
> (Don't forget the `alt' attribute, give it a descriptive value if
> possible/applicable!)
>
> BTW, QuickREx again came in handy in finding that out:
>
<http://www.bastian-bergerhoff.com/eclipse/features/web/QuickREx/toc.html>=
>
> 5. With the exception of `(?s)', which can be worked around with
> =A0 =A0`(?:.|[\r\n])' instead of `.', this should also work with
> =A0 =A0String.prototype.replace() in JavaScript 1.5+ (Mozilla/5.0),
> =A0 =A0JScript 5.5+ (IE 5.5+), ECMAScript Ed. 3+.
>
> 6. Replacing content this way might require using `innerHTML', a
> =A0 =A0proprietary property that should be avoided in favor of DOM 2
scrip=
ting.
>
> HTH
>
> PointedEars
> --
> Anyone who slaps a 'this page is best viewed with Browser X' label on
> a Web page appears to be yearning for the bad old days, before the Web,
> when you had very little chance of reading a do***ent written on another
> computer, another word processor, or another network. -- Tim Berners-Lee
I tried to use QuickREx (application, that U noticed) and indeed, it
show matches correct. But in javascript it doesn't replace my text at
all.


|