| index 4a15f36..9d356fa 100644 | ||
| --- a/src/ui.html | ||
| +++ b/src/ui.html | ||
| @@ -162,8 +162,8 @@ var pwd=q.get('pwd')||(node&&localStorage.getItem('bot_pwd_'+node))|| | ||
| 162 | 162 | var HUB=q.get('plugin')||''; |
| 163 | 163 | |
| 164 | 164 | function url(action,extra){ |
| 165 | - return (HUB?'/plugins?plugin='+encodeURIComponent(HUB):'/plugin_google_quota')+ | |
| 166 | - '?action='+encodeURIComponent(action)+ | |
| 165 | + return (HUB?'/plugins?plugin='+encodeURIComponent(HUB)+'&':'/plugin_google_quota?')+ | |
| 166 | + 'action='+encodeURIComponent(action)+ | |
| 167 | 167 | (extra?('&'+extra):'')+ |
| 168 | 168 | (node?'&node='+encodeURIComponent(node):'')+ |
| 169 | 169 | (sid?'&id='+encodeURIComponent(sid):'')+ |
| index 87a7ad6..e0c2767 100644 | ||
| --- a/src/ui_html.h | ||
| +++ b/src/ui_html.h | ||
| @@ -167,8 +167,8 @@ static const char *UI_HTML = | ||
| 167 | 167 | "var HUB=q.get('plugin')||'';\n" |
| 168 | 168 | "\n" |
| 169 | 169 | "function url(action,extra){\n" |
| 170 | - " return (HUB?'/plugins?plugin='+encodeURIComponent(HUB):'/plugin_google_quota')+\n" | |
| 171 | - " '?action='+encodeURIComponent(action)+\n" | |
| 170 | + " return (HUB?'/plugins?plugin='+encodeURIComponent(HUB)+'&':'/plugin_google_quota?')+\n" | |
| 171 | + " 'action='+encodeURIComponent(action)+\n" | |
| 172 | 172 | " (extra?('&'+extra):'')+\n" |
| 173 | 173 | " (node?'&node='+encodeURIComponent(node):'')+\n" |
| 174 | 174 | " (sid?'&id='+encodeURIComponent(sid):'')+\n" |
| index 6de407f..fc73f17 100755 | ||
| --- a/tests/run.sh | ||
| +++ b/tests/run.sh | ||
| @@ -181,6 +181,7 @@ check "HTML emits Content-Type text/html" "Content-Type: text/html" "$HTML" | ||
| 181 | 181 | check "HTML includes bot theme prepaint" "bot_theme" "$HTML" |
| 182 | 182 | check "HTML includes theme handoff" "sx-theme-request" "$HTML" |
| 183 | 183 | check "HTML uses two-route API helper" "plugin_google_quota" "$HTML" |
| 184 | +check "HTML hub proxy URL uses &action= separator" "'/plugins?plugin='+encodeURIComponent(HUB)+'&'" "$HTML" | |
| 184 | 185 | check "HTML hides theme toggle in embed mode" "embed-hide" "$HTML" |
| 185 | 186 | check_not "HTML loads no CDN script" "<script src=" "$HTML" |
| 186 | 187 | check_not "HTML references no external host script" "cdnjs" "$HTML" |
| 187 | 188 |
| index 4a15f36..9d356fa 100644 | index 4a15f36..9d356fa 100644 | ||
| --- a/src/ui.html | --- a/src/ui.html | ||
| +++ b/src/ui.html | +++ b/src/ui.html | ||
| @@ -162,8 +162,8 @@ var pwd=q.get('pwd')||(node&&localStorage.getItem('bot_pwd_'+node))|| | @@ -162,8 +162,8 @@ var pwd=q.get('pwd')||(node&&localStorage.getItem('bot_pwd_'+node))|| | ||
| 162 | var HUB=q.get('plugin')||''; | 162 | var HUB=q.get('plugin')||''; |
| 163 | 163 | ||
| 164 | function url(action,extra){ | 164 | function url(action,extra){ |
| 165 | - return (HUB?'/plugins?plugin='+encodeURIComponent(HUB):'/plugin_google_quota')+ | 165 | + return (HUB?'/plugins?plugin='+encodeURIComponent(HUB)+'&':'/plugin_google_quota?')+ |
| 166 | - '?action='+encodeURIComponent(action)+ | 166 | + 'action='+encodeURIComponent(action)+ |
| 167 | (extra?('&'+extra):'')+ | 167 | (extra?('&'+extra):'')+ |
| 168 | (node?'&node='+encodeURIComponent(node):'')+ | 168 | (node?'&node='+encodeURIComponent(node):'')+ |
| 169 | (sid?'&id='+encodeURIComponent(sid):'')+ | 169 | (sid?'&id='+encodeURIComponent(sid):'')+ |
| index 87a7ad6..e0c2767 100644 | index 87a7ad6..e0c2767 100644 | ||
| --- a/src/ui_html.h | --- a/src/ui_html.h | ||
| +++ b/src/ui_html.h | +++ b/src/ui_html.h | ||
| @@ -167,8 +167,8 @@ static const char *UI_HTML = | @@ -167,8 +167,8 @@ static const char *UI_HTML = | ||
| 167 | "var HUB=q.get('plugin')||'';\n" | 167 | "var HUB=q.get('plugin')||'';\n" |
| 168 | "\n" | 168 | "\n" |
| 169 | "function url(action,extra){\n" | 169 | "function url(action,extra){\n" |
| 170 | - " return (HUB?'/plugins?plugin='+encodeURIComponent(HUB):'/plugin_google_quota')+\n" | 170 | + " return (HUB?'/plugins?plugin='+encodeURIComponent(HUB)+'&':'/plugin_google_quota?')+\n" |
| 171 | - " '?action='+encodeURIComponent(action)+\n" | 171 | + " 'action='+encodeURIComponent(action)+\n" |
| 172 | " (extra?('&'+extra):'')+\n" | 172 | " (extra?('&'+extra):'')+\n" |
| 173 | " (node?'&node='+encodeURIComponent(node):'')+\n" | 173 | " (node?'&node='+encodeURIComponent(node):'')+\n" |
| 174 | " (sid?'&id='+encodeURIComponent(sid):'')+\n" | 174 | " (sid?'&id='+encodeURIComponent(sid):'')+\n" |
| index 6de407f..fc73f17 100755 | index 6de407f..fc73f17 100755 | ||
| --- a/tests/run.sh | --- a/tests/run.sh | ||
| +++ b/tests/run.sh | +++ b/tests/run.sh | ||
| @@ -181,6 +181,7 @@ check "HTML emits Content-Type text/html" "Content-Type: text/html" "$HTML" | @@ -181,6 +181,7 @@ check "HTML emits Content-Type text/html" "Content-Type: text/html" "$HTML" | ||
| 181 | check "HTML includes bot theme prepaint" "bot_theme" "$HTML" | 181 | check "HTML includes bot theme prepaint" "bot_theme" "$HTML" |
| 182 | check "HTML includes theme handoff" "sx-theme-request" "$HTML" | 182 | check "HTML includes theme handoff" "sx-theme-request" "$HTML" |
| 183 | check "HTML uses two-route API helper" "plugin_google_quota" "$HTML" | 183 | check "HTML uses two-route API helper" "plugin_google_quota" "$HTML" |
| 184 | +check "HTML hub proxy URL uses &action= separator" "'/plugins?plugin='+encodeURIComponent(HUB)+'&'" "$HTML" | ||
| 184 | check "HTML hides theme toggle in embed mode" "embed-hide" "$HTML" | 185 | check "HTML hides theme toggle in embed mode" "embed-hide" "$HTML" |
| 185 | check_not "HTML loads no CDN script" "<script src=" "$HTML" | 186 | check_not "HTML loads no CDN script" "<script src=" "$HTML" |
| 186 | check_not "HTML references no external host script" "cdnjs" "$HTML" | 187 | check_not "HTML references no external host script" "cdnjs" "$HTML" |
| 187 | 188 |