Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Check for lowercased/normalized refresh http-equiv
Browse files Browse the repository at this point in the history
  • Loading branch information
kylehickinson committed Feb 24, 2021
1 parent 03f7891 commit 977118f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Client/Frontend/Browser/Favicons/FaviconFetcher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ class FaviconFetcher {
// favicons
var reloadUrl: URL?
for meta in root.xpath("//head/meta") {
if let refresh = meta["http-equiv"], refresh == "Refresh",
if let refresh = meta["http-equiv"]?.lowercased(), refresh == "refresh",
let content = meta["content"],
let index = content.range(of: "URL="),
let url = NSURL(string: String(content.suffix(from: index.upperBound))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class BraveTodayAddSourceViewController: UITableViewController {
// favicons
var reloadUrl: URL?
for meta in root.xpath("//head/meta") {
if let refresh = meta["http-equiv"], refresh == "Refresh",
if let refresh = meta["http-equiv"]?.lowercased(), refresh == "refresh",
let content = meta["content"],
let index = content.range(of: "URL="),
let url = NSURL(string: String(content.suffix(from: index.upperBound))) {
Expand Down

0 comments on commit 977118f

Please sign in to comment.