diff --git a/analysis_options.yaml b/analysis_options.yaml index 05f98247f13a..496ddf31bf76 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -48,7 +48,6 @@ linter: - avoid_init_to_null - avoid_js_rounded_ints # - avoid_multiple_declarations_per_line # seems to be a stylistic choice we don't subscribe to - - avoid_null_checks_in_equality_operators # - avoid_positional_boolean_parameters # would have been nice to enable this but by now there's too many places that break it - avoid_print # - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356) @@ -219,7 +218,6 @@ linter: - unnecessary_to_list_in_spreads - unreachable_from_main - unrelated_type_equality_checks - - unsafe_html - use_build_context_synchronously - use_colored_box # - use_decorated_box # leads to bugs: DecoratedBox and Container are not equivalent (Container inserts extra padding) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index b8ec01d3c111..f6af32046ccd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -258,7 +258,6 @@ gmaps.InfoWindowOptions? _infoWindowOptionsFromMarker(Marker marker) { // XSS attacks through the contents of the marker InfoWindow. // See: https://pub.dev/documentation/sanitize_html/latest/sanitize_html/sanitizeHtml.html // See: b/159137885, b/159598165 - // ignore: unsafe_html snippet.innerHTMLString = sanitizeHtml(markerSnippet); } diff --git a/packages/image_picker/image_picker_for_web/lib/src/image_resizer.dart b/packages/image_picker/image_picker_for_web/lib/src/image_resizer.dart index 3ecf7823aff8..8cba8cfe91de 100644 --- a/packages/image_picker/image_picker_for_web/lib/src/image_resizer.dart +++ b/packages/image_picker/image_picker_for_web/lib/src/image_resizer.dart @@ -47,7 +47,6 @@ class ImageResizer { Completer(); final web.HTMLImageElement imageElement = web.HTMLImageElement(); imageElement - // ignore: unsafe_html ..src = blobUrl ..onLoad.listen((web.Event event) { imageLoadCompleter.complete(imageElement); diff --git a/packages/url_launcher/url_launcher_web/lib/url_launcher_web.dart b/packages/url_launcher/url_launcher_web/lib/url_launcher_web.dart index 1a33f3aea7c6..b3de107d4368 100644 --- a/packages/url_launcher/url_launcher_web/lib/url_launcher_web.dart +++ b/packages/url_launcher/url_launcher_web/lib/url_launcher_web.dart @@ -86,7 +86,6 @@ class UrlLauncherPlugin extends UrlLauncherPlatform { final String target = webOnlyWindowName ?? ((_isSafari && _isSafariTargetTopScheme(scheme)) ? '_top' : ''); - // ignore: unsafe_html _window.open(url, target, 'noopener,noreferrer'); return true; diff --git a/packages/webview_flutter/webview_flutter_web/lib/src/web_webview_controller.dart b/packages/webview_flutter/webview_flutter_web/lib/src/web_webview_controller.dart index 2d8297fb5fd5..d18987223a11 100644 --- a/packages/webview_flutter/webview_flutter_web/lib/src/web_webview_controller.dart +++ b/packages/webview_flutter/webview_flutter_web/lib/src/web_webview_controller.dart @@ -60,7 +60,6 @@ class WebWebViewController extends PlatformWebViewController { @override Future loadHtmlString(String html, {String? baseUrl}) async { - // ignore: unsafe_html _webWebViewParams.iFrame.src = Uri.dataFromString( html, mimeType: 'text/html', @@ -78,7 +77,6 @@ class WebWebViewController extends PlatformWebViewController { if (params.headers.isEmpty && (params.body == null || params.body!.isEmpty) && params.method == LoadRequestMethod.get) { - // ignore: unsafe_html _webWebViewParams.iFrame.src = params.uri.toString(); } else { await _updateIFrameFromXhr(params); @@ -99,7 +97,6 @@ class WebWebViewController extends PlatformWebViewController { final ContentType contentType = ContentType.parse(header); final Encoding encoding = Encoding.getByName(contentType.charset) ?? utf8; - // ignore: unsafe_html _webWebViewParams.iFrame.src = Uri.dataFromString( (await response.text().toDart).toDart, mimeType: contentType.mimeType, diff --git a/packages/webview_flutter/webview_flutter_web/lib/src/webview_flutter_web_legacy.dart b/packages/webview_flutter/webview_flutter_web/lib/src/webview_flutter_web_legacy.dart index 460323e4e267..4471ce6fed66 100644 --- a/packages/webview_flutter/webview_flutter_web/lib/src/webview_flutter_web_legacy.dart +++ b/packages/webview_flutter/webview_flutter_web/lib/src/webview_flutter_web_legacy.dart @@ -36,7 +36,6 @@ class WebWebViewPlatform implements WebViewPlatform { iFrame.style.border = 'none'; final String? initialUrl = creationParams.initialUrl; if (initialUrl != null) { - // ignore: unsafe_html iFrame.src = initialUrl; } if (onWebViewPlatformCreated != null) { @@ -127,7 +126,6 @@ class WebWebViewPlatformController implements WebViewPlatformController { @override Future loadUrl(String url, Map? headers) async { - // ignore: unsafe_html _element.src = url; } @@ -176,7 +174,6 @@ class WebWebViewPlatformController implements WebViewPlatformController { String html, { String? baseUrl, }) async { - // ignore: unsafe_html _element.src = Uri.dataFromString( html, mimeType: 'text/html',