travelmate: support meta-refresh with single-quote 16785/head
authorKamil Trzciński <ayufan@ayufan.eu>
Fri, 1 Oct 2021 13:17:00 +0000 (16:17 +0300)
committerKamil Trzciński <ayufan@ayufan.eu>
Mon, 4 Oct 2021 07:37:51 +0000 (10:37 +0300)
Currently `travelmate` only support `<meta` tag
if it contains `"`. This updates `travelmate.sh` to support
`'` as well.

```html
<meta...content='1; url=
```

Signed-off-by: Kamil Trzciński <ayufan@ayufan.eu>
net/travelmate/Makefile
net/travelmate/files/travelmate.sh

index ce6ea8425fef66cd01b8fe2a67ff668e551c4632..2b7f640d0c258348b26e8bbe895fd6a58e7f3c1e 100644 (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>
 
index 6a0fe7f8a00d97e00990c2e1f198eae65cb00a15..e0a6b497716386dd2d3e8a81084f7f2c1a15bbc0 100755 (executable)
@@ -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