|
Drag-and-Drop Resizable Flash...
|
|
Dec. 02, 2008, 09:23 PM
Post: #52
|
|||
|
|||
RE: Drag-and-Drop Resizable Flash...
ProxRocks Wrote:the ResizeDiv width/height is, i'm hoping, only "temporary"... Yeah, that 100% right off the bat doesn't work so nice. From what I've seen, it would be better to use the initial size until you decide to change it. ProxRocks Wrote:i've been "trying" some other methods, but the "base" of those attempts is an old LWC filter which i can't get to work anymore... Ahh... the good old days before everybody started using js to put in flash. Which is the root of the problem your having with this filter. Take a look at the popular swfobject.js. Many of the sites on your "list" use it. Here's some code snippets from one version: Code: <embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")Code: <object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"Good luck trying to match the file name or size attributes in that code. ![]() In the replacement text there's some potential issues. Most of the replacement text is not js friendly. Characters that are js sensitive aren't escaped. In other places, \0 which was captured in the match, is used for the replacement attribute quote. It seems like a good idea and I've tried this method myself. But when js is involved, it's just not reliable. Now days, if I suspect a filter might match in js, I include a $TST for js. That way, an escape variable or two can be preset accordingly. In the Replacement Text, js sensitive characters are preceded by an escape variable. I'm a bit leery of using character entity references in the replacement text. The trailing semicolon is my main concern. For the most part, I've had good luck variable escaping [";'] replacement characters. No doubt I'll find some js that breaks because I didn't escape some other character. I'm betting it's going to be one of these characters: [()<>]. As for the idea part, maybe adding some variation of match like this: Code: &*(swf|shockwave|flash|clsid:blah...blah)We could stick it in there, if something doesn't match, we should see it. ![]() z12 |
|||
|
« Next Oldest | Next Newest »
|

Search
Member List
Calendar
Help






![[-]](images/ONi/collapse.gif)