[packages] ddns-scripts: fix escaping of option values (closes: #5327)
[openwrt/svn-archive/archive.git] / net / ddns-scripts / files / usr / lib / ddns / dynamic_dns_updater.sh
index 62d4886971bd78154ca8bc97a01d18798e4096de..ed0396da9c980a75c8cfdeb08c3c2b46505f41bf 100755 (executable)
@@ -250,7 +250,8 @@ do
                do
                        replace_name=$(echo "\[$option_var\]" | tr 'a-z' 'A-Z')
                        replace_value=$(eval echo "\$$option_var")
-                       final_url=$(echo $final_url | sed s/"$replace_name"/"$replace_value"/g )
+                       replace_value=$(echo $replace_value | sed -f /usr/lib/ddns/url_escape.sed)
+                       final_url=$(echo $final_url | sed s^"$replace_name"^"$replace_value"^g )
                done    
                final_url=$(echo $final_url | sed s/"\[IP\]"/"$current_ip"/g )