summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.editorconfig14
-rwxr-xr-xiptv.sh4
2 files changed, 16 insertions, 2 deletions
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..739afee
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,14 @@
+# EditorConfig is awesome: https://editorconfig.org
+
+# top-most EditorConfig file
+root = true
+
+# Unix-style newlines with a newline ending every file
+[*]
+end_of_line = lf
+insert_final_newline = true
+
+[*.sh]
+charset = utf-8
+indent_style = space
+indent_size = 2
diff --git a/iptv.sh b/iptv.sh
index 8d1c807..937007b 100755
--- a/iptv.sh
+++ b/iptv.sh
@@ -113,7 +113,7 @@ make_epg () {
hwcode=$(echo "$response" | jq -r '.channel.params.hwcode')
echo " <channel id=\"$hwcode\">" >> $output_file
- echo " <display-name lang=\"zh\">$channel_title</display-name>" >> $output_file
+ echo " <display-name lang=\"zh\"><![CDATA[$channel_title]]></display-name>" >> $output_file
echo " <icon src=\"$channel_icon\"/>" >> $output_file
echo " </channel>" >> $output_file
@@ -123,7 +123,7 @@ make_epg () {
schedule_endtime=$(echo "$schedule" | jq -r '.endtime')
echo " <programme start=\"$schedule_starttime +0800\" stop=\"$schedule_endtime +0800\" channel=\"$hwcode\">" >> $output_file
- echo " <title lang=\"zh\">$schedule_title</title>" >> $output_file
+ echo " <title lang=\"zh\"><![CDATA[$schedule_title]]></title>" >> $output_file
echo " </programme>" >> $output_file
done < <(echo "$response" | jq -c '.schedules[]')
fi