Merge pull request #16785 from ayufan-research/master

travelmate: support meta-refresh with single-quote
This commit is contained in:
Dirk Brenken 2021-10-04 10:10:28 +02:00 committed by GitHub
commit 9024ce70d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=travelmate
PKG_VERSION:=2.0.7
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>

View file

@ -491,7 +491,7 @@ f_net() {
result="net cp '${json_cp}'"
else
if [ "${json_rc}" = "200" ] || [ "${json_rc}" = "204" ]; then
html_cp="$(printf "%s" "${html_raw}" | awk 'match(tolower($0),/^.*<meta[ \t]+http-equiv=["]*refresh.*[ \t;]url=/){print substr(tolower($0),RLENGTH+1)}' | awk 'BEGIN{FS="[:/]"}{printf "%s",$4;exit}')"
html_cp="$(printf "%s" "${html_raw}" | awk 'match(tolower($0),/^.*<meta[ \t]+http-equiv=['\''"]*refresh.*[ \t;]url=/){print substr(tolower($0),RLENGTH+1)}' | awk 'BEGIN{FS="[:/]"}{printf "%s",$4;exit}')"
if [ -n "${html_cp}" ]; then
result="net cp '${html_cp}'"
else