-
darin authored
Reviewed by Richard. - fixed 3124837 -- Crash trying to handle weird javascript URL in page address field * Misc.subproj/WebNSURLExtras.h: Added _web_scriptIfJavaScriptURL for both NSURL and NSString, and _web_stringByReplacingValidPercentEscapes. * Misc.subproj/WebNSURLExtras.m: (-[NSURL _web_scriptIfJavaScriptURL]): Added. Call the NSString version on our absoluteString. (isHexDigit): Added. (hexDigitValue): Added. (-[NSString _web_stringByReplacingValidPercentEscapes]): Added. Converts the sequences into character, and then re-encodes as UTF-8. Added a FIXME about doing even better. (-[NSString _web_scriptIfJavaScriptURL]): Check for a javascript: prefix, then turn the suffix into a script by replacing percent escapes. * English.lproj/StringsNotToBeLocalized.txt: Updated. WebCore: Reviewed by Richard. - fixed 3124263 -- REGRESSION: Crash running development build of PLT * kwq/KWQWidget.mm: (QWidget::~QWidget): Don't worry about the outer view here, since we can never hit one of those. Just pass the view to KWQKHTMLPart::widgetWillReleaseView. (QWidget::getOuterView): Re-add the assertion I had removed. - fixed 3124837 -- Crash trying to handle weird javascript URL in page address field * kwq/KWQKURL.mm: (KURL::decode_string): Made this function return the URL still encoded rather than a null string (actually, crashing) when CFURLCreateStringByReplacingPercentEscapes rejects the passed-in string. Also updated the FIXME. (appendEscapingBadChars): Fixed problem with high-bit-set characters. * kwq/KWQString.mm: (QString::setBufferFromCFString): Made this tolerant of NULL. WebKit: Reviewed by Richard. - fixed 3124837 -- Crash trying to handle weird javascript URL in page address field * Plugins.subproj/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]): Use the new _web_scriptIfJavaScriptURL to simplify the check for JavaScript URLs, and to use a more tolerant unescaper. * English.lproj/StringsNotToBeLocalized.txt: Updated. WebBrowser: Reviewed by Richard. - fixed 3124837 -- Crash trying to handle weird javascript URL in page address field * BrowserWebBookmarkExtras.m: (-[WebBookmark _goToWithWindowPolicy:]): * BrowserWindowController.m: (-[BrowserWindowController goToToolbarLocation:]): Use the new _web_scriptIfJavaScriptURL to simplify the check for JavaScript URLs, and to use a more tolerant unescaper. * BrowserWebController.m: (-[BrowserWebController mouseoverTextForElement:modifierFlags:]): Use _web_stringByReplacingValidPercentEscapes, since it is more tolerant than CFURLCreateStringByReplacingPercentEscapes. * English.lproj/StringsNotToBeLocalized.txt: Updated. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3004 268f45cc-cd09-0410-ab3c-d52691b4dbfc
039a8a81