Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable two lint rules which are being removed. #7959

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class ImageResizer {
Completer<web.HTMLImageElement>();
final web.HTMLImageElement imageElement = web.HTMLImageElement();
imageElement
// ignore: unsafe_html
..src = blobUrl
..onLoad.listen((web.Event event) {
imageLoadCompleter.complete(imageElement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class WebWebViewController extends PlatformWebViewController {

@override
Future<void> loadHtmlString(String html, {String? baseUrl}) async {
// ignore: unsafe_html
_webWebViewParams.iFrame.src = Uri.dataFromString(
html,
mimeType: 'text/html',
Expand All @@ -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);
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -127,7 +126,6 @@ class WebWebViewPlatformController implements WebViewPlatformController {

@override
Future<void> loadUrl(String url, Map<String, String>? headers) async {
// ignore: unsafe_html
_element.src = url;
}

Expand Down Expand Up @@ -176,7 +174,6 @@ class WebWebViewPlatformController implements WebViewPlatformController {
String html, {
String? baseUrl,
}) async {
// ignore: unsafe_html
_element.src = Uri.dataFromString(
html,
mimeType: 'text/html',
Expand Down