Skip to content

Commit 01aa4bd

Browse files
committed
fix ssa protocol encoding issues
1 parent c4fc6a5 commit 01aa4bd

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

ext.ssa.client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package kyoto
22

3-
var ssaclient = "<script>(()=>{var q=11;function ne(e,r){var t=r.attributes,n,a,d,u,h;if(!(r.nodeType===q||e.nodeType===q)){for(var A=t.length-1;A>=0;A--)n=t[A],a=n.name,d=n.namespaceURI,u=n.value,d?(a=n.localName||a,h=e.getAttributeNS(d,a),h!==u&&(n.prefix===\"xmlns\"&&(a=n.name),e.setAttributeNS(d,a,u))):(h=e.getAttribute(a),h!==u&&e.setAttribute(a,u));for(var v=e.attributes,g=v.length-1;g>=0;g--)n=v[g],a=n.name,d=n.namespaceURI,d?(a=n.localName||a,r.hasAttributeNS(d,a)||e.removeAttributeNS(d,a)):r.hasAttribute(a)||e.removeAttribute(a)}}var P,ae=\"http://www.w3.org/1999/xhtml\",c=typeof document==\"undefined\"?void 0:document,ie=!!c&&\"content\"in c.createElement(\"template\"),le=!!c&&c.createRange&&\"createContextualFragment\"in c.createRange();function se(e){var r=c.createElement(\"template\");return r.innerHTML=e,r.content.childNodes[0]}function de(e){P||(P=c.createRange(),P.selectNode(c.body));var r=P.createContextualFragment(e);return r.childNodes[0]}function oe(e){var r=c.createElement(\"body\");return r.innerHTML=e,r.childNodes[0]}function ue(e){return e=e.trim(),ie?se(e):le?de(e):oe(e)}function R(e,r){var t=e.nodeName,n=r.nodeName,a,d;return t===n?!0:(a=t.charCodeAt(0),d=n.charCodeAt(0),a<=90&&d>=97?t===n.toUpperCase():d<=90&&a>=97?n===t.toUpperCase():!1)}function fe(e,r){return!r||r===ae?c.createElement(e):c.createElementNS(r,e)}function ce(e,r){for(var t=e.firstChild;t;){var n=t.nextSibling;r.appendChild(t),t=n}return r}function G(e,r,t){e[t]!==r[t]&&(e[t]=r[t],e[t]?e.setAttribute(t,\"\"):e.removeAttribute(t))}var z={OPTION:function(e,r){var t=e.parentNode;if(t){var n=t.nodeName.toUpperCase();n===\"OPTGROUP\"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n===\"SELECT\"&&!t.hasAttribute(\"multiple\")&&(e.hasAttribute(\"selected\")&&!r.selected&&(e.setAttribute(\"selected\",\"selected\"),e.removeAttribute(\"selected\")),t.selectedIndex=-1)}G(e,r,\"selected\")},INPUT:function(e,r){G(e,r,\"checked\"),G(e,r,\"disabled\"),e.value!==r.value&&(e.value=r.value),r.hasAttribute(\"value\")||e.removeAttribute(\"value\")},TEXTAREA:function(e,r){var t=r.value;e.value!==t&&(e.value=t);var n=e.firstChild;if(n){var a=n.nodeValue;if(a==t||!t&&a==e.placeholder)return;n.nodeValue=t}},SELECT:function(e,r){if(!r.hasAttribute(\"multiple\")){for(var t=-1,n=0,a=e.firstChild,d,u;a;)if(u=a.nodeName&&a.nodeName.toUpperCase(),u===\"OPTGROUP\")d=a,a=d.firstChild;else{if(u===\"OPTION\"){if(a.hasAttribute(\"selected\")){t=n;break}n++}a=a.nextSibling,!a&&d&&(a=d.nextSibling,d=null)}e.selectedIndex=t}}},L=1,ve=11,k=3,W=8;function w(){}function pe(e){if(e)return e.getAttribute&&e.getAttribute(\"id\")||e.id}function he(e){return function(t,n,a){if(a||(a={}),typeof n==\"string\")if(t.nodeName===\"#document\"||t.nodeName===\"HTML\"||t.nodeName===\"BODY\"){var d=n;n=c.createElement(\"html\"),n.innerHTML=d}else n=ue(n);var u=a.getNodeKey||pe,h=a.onBeforeNodeAdded||w,A=a.onNodeAdded||w,v=a.onBeforeElUpdated||w,g=a.onElUpdated||w,Q=a.onBeforeNodeDiscarded||w,N=a.onNodeDiscarded||w,Z=a.onBeforeElChildrenUpdated||w,C=a.childrenOnly===!0,S=Object.create(null),O=[];function M(s){O.push(s)}function J(s,l){if(s.nodeType===L)for(var i=s.firstChild;i;){var o=void 0;l&&(o=u(i))?M(o):(N(i),i.firstChild&&J(i,l)),i=i.nextSibling}}function x(s,l,i){Q(s)!==!1&&(l&&l.removeChild(s),N(s),J(s,i))}function K(s){if(s.nodeType===L||s.nodeType===ve)for(var l=s.firstChild;l;){var i=u(l);i&&(S[i]=l),K(l),l=l.nextSibling}}K(t);function F(s){A(s);for(var l=s.firstChild;l;){var i=l.nextSibling,o=u(l);if(o){var p=S[o];p&&R(l,p)?(l.parentNode.replaceChild(p,l),H(p,l)):F(l)}else F(l);l=i}}function ee(s,l,i){for(;l;){var o=l.nextSibling;(i=u(l))?M(i):x(l,s,!0),l=o}}function H(s,l,i){var o=u(l);o&&delete S[o],!(!i&&(v(s,l)===!1||(e(s,l),g(s),Z(s,l)===!1)))&&(s.nodeName!==\"TEXTAREA\"?te(s,l):z.TEXTAREA(s,l))}function te(s,l){var i=l.firstChild,o=s.firstChild,p,b,y,U,T;e:for(;i;){for(U=i.nextSibling,p=u(i);o;){if(y=o.nextSibling,i.isSameNode&&i.isSameNode(o)){i=U,o=y;continue e}b=u(o);var _=o.nodeType,m=void 0;if(_===i.nodeType&&(_===L?(p?p!==b&&((T=S[p])?y===T?m=!1:(s.insertBefore(T,o),b?M(b):x(o,s,!0),o=T):m=!1):b&&(m=!1),m=m!==!1&&R(o,i),m&&H(o,i)):(_===k||_==W)&&(m=!0,o.nodeValue!==i.nodeValue&&(o.nodeValue=i.nodeValue))),m){i=U,o=y;continue e}b?M(b):x(o,s,!0),o=y}if(p&&(T=S[p])&&R(T,i))s.appendChild(T),H(T,i);else{var $=h(i);$!==!1&&($&&(i=$),i.actualize&&(i=i.actualize(s.ownerDocument||c)),s.appendChild(i),F(i))}i=U,o=y}ee(s,o,b);var j=z[s.nodeName];j&&j(s,l)}var f=t,D=f.nodeType,X=n.nodeType;if(!C){if(D===L)X===L?R(t,n)||(N(t),f=ce(t,fe(n.nodeName,n.namespaceURI))):f=n;else if(D===k||D===W){if(X===D)return f.nodeValue!==n.nodeValue&&(f.nodeValue=n.nodeValue),f;f=n}}if(f===n)N(t);else{if(n.isSameNode&&n.isSameNode(f))return;if(H(f,n,C),O)for(var I=0,re=O.length;I<re;I++){var V=S[O[I]];V&&x(V,V.parentNode,!1)}}return!C&&f!==t&&t.parentNode&&(f.actualize&&(f=f.actualize(t.ownerDocument||c)),t.parentNode.replaceChild(f,t)),f}}var Ae=he(ne),Y=Ae;function B(e){let r=e.starter;if(e.id){let t=document.getElementById(e.id);if(!t)throw new Error(`Error while locating root with id: can't find direct with ${e}`);r=t}else{let t=0;for(;;){if(!r.parentElement)throw new Error(`Error while locating root: can't find parent with ${e}`);if(!r.getAttribute(\"state\"))r=r.parentElement;else if(e.depth&&t!=e.depth)r=r.parentElement,t++;else break}}return r}function ge(e){return e.includes(\":\")&&(e=e.split(\":\")[1]),e.includes(\"$\")&&(e=e.replaceAll(\"$\",\"\")),e}function be(e){e.querySelectorAll(\"[ssa\\\\:oncall\\\\.display]\").forEach(t=>{let n=t.getAttribute(\"ssa:oncall.display\");n!=\"\"&&t.setAttribute(\"style\",\"display: \"+n)})}function Te(){document.querySelectorAll(\"[ssa\\\\:onload]\").forEach(e=>{let r=e.getAttribute(\"ssa:onload\");r&&r!=\"\"&&E(e,r)})}function me(){document.querySelectorAll(\"[ssa\\\\:poll]\").forEach(e=>{let r=e.getAttribute(\"ssa:poll\")||\"\",t=e.getAttribute(\"ssa:poll.interval\");r&&r!=\"\"&&t&&t!=\"\"&&setInterval(()=>{E(e,r)},parseInt(t))})}function we(){document.querySelectorAll(\"[ssa\\\\:onintersect]\").forEach(e=>{let r=e.getAttribute(\"ssa:onintersect\")||\"\",t=e.getAttribute(\"ssa:onintersect.threshold\")||\"1.0\";r!=\"\"&&new IntersectionObserver(a=>{a.forEach(d=>{d.intersectionRatio>=parseFloat(t)&&E(e,r,parseFloat(t))})},{threshold:parseFloat(t)}).observe(e)})}function E(e,r,...t){return new Promise((n,a)=>{let d=B({starter:e,depth:r.split(\"\").filter(A=>A===\"$\").length,id:r.includes(\":\")?r.split(\":\")[0]:void 0});be(d);let u=ssapath;u+=`/${d.getAttribute(\"name\")}`,u+=`/${d.getAttribute(\"state\")||\"{}\"}`,u+=`/${ge(r)}`,u+=`/${btoa(JSON.stringify(t).replaceAll(\"/\",\"-\"))}`;let h=new EventSource(u);h.onmessage=A=>{let v=A.data;if(!!v){if(v.startsWith(\"ssa:redirect=\")){let g=v.replace(\"ssa:redirect=\",\"\");window.location.href=g;return}if(d.getAttribute(\"ssa:render.mode\")==\"replace\"){d.outerHTML=v;return}try{Y(d,v)}catch(g){console.log(\"Fallback from morphdom to root.outerHTML due to error\",g),d.outerHTML=v}}},h.onerror=A=>{h.close(),n()}})}function Se(e,r){let t=B({starter:e,depth:r.split(\"\").filter(a=>a===\"$\").length,id:r.includes(\":\")?r.split(\":\")[0]:void 0});if(!t.getAttribute(\"state\"))throw new Error(\"Bind call error: component state is underfined\");let n=JSON.parse(atob(t.getAttribute(\"state\")));n[r]=e.value,t.setAttribute(\"state\",btoa(JSON.stringify(n).replaceAll(\"/\",\"%2F\")))}function ye(e,r){r.preventDefault();let t=B({starter:e});if(!t.getAttribute(\"state\"))throw new Error(\"Bind call error: component state is underfined\");let n=JSON.parse(atob(t.getAttribute(\"state\"))),a=new FormData(r.target),d=Object.fromEntries(a.entries());return Object.entries(d).forEach(u=>{n[u[0]]=u[1]}),t.setAttribute(\"state\",btoa(JSON.stringify(n).replaceAll(\"/\",\"%2F\"))),E(t,\"Submit\"),!1}window._LocaleRoot=B;window.Action=E;window.Bind=Se;window.FormSubmit=ye;document.addEventListener(\"DOMContentLoaded\",Te);document.addEventListener(\"DOMContentLoaded\",we);document.addEventListener(\"DOMContentLoaded\",me);})();</script>"
3+
var ssaclient = "<script>(()=>{var q=11;function ne(e,r){var t=r.attributes,n,a,d,u,h;if(!(r.nodeType===q||e.nodeType===q)){for(var A=t.length-1;A>=0;A--)n=t[A],a=n.name,d=n.namespaceURI,u=n.value,d?(a=n.localName||a,h=e.getAttributeNS(d,a),h!==u&&(n.prefix===\"xmlns\"&&(a=n.name),e.setAttributeNS(d,a,u))):(h=e.getAttribute(a),h!==u&&e.setAttribute(a,u));for(var v=e.attributes,g=v.length-1;g>=0;g--)n=v[g],a=n.name,d=n.namespaceURI,d?(a=n.localName||a,r.hasAttributeNS(d,a)||e.removeAttributeNS(d,a)):r.hasAttribute(a)||e.removeAttribute(a)}}var P,ae=\"http://www.w3.org/1999/xhtml\",c=typeof document==\"undefined\"?void 0:document,ie=!!c&&\"content\"in c.createElement(\"template\"),le=!!c&&c.createRange&&\"createContextualFragment\"in c.createRange();function se(e){var r=c.createElement(\"template\");return r.innerHTML=e,r.content.childNodes[0]}function de(e){P||(P=c.createRange(),P.selectNode(c.body));var r=P.createContextualFragment(e);return r.childNodes[0]}function oe(e){var r=c.createElement(\"body\");return r.innerHTML=e,r.childNodes[0]}function ue(e){return e=e.trim(),ie?se(e):le?de(e):oe(e)}function R(e,r){var t=e.nodeName,n=r.nodeName,a,d;return t===n?!0:(a=t.charCodeAt(0),d=n.charCodeAt(0),a<=90&&d>=97?t===n.toUpperCase():d<=90&&a>=97?n===t.toUpperCase():!1)}function fe(e,r){return!r||r===ae?c.createElement(e):c.createElementNS(r,e)}function ce(e,r){for(var t=e.firstChild;t;){var n=t.nextSibling;r.appendChild(t),t=n}return r}function G(e,r,t){e[t]!==r[t]&&(e[t]=r[t],e[t]?e.setAttribute(t,\"\"):e.removeAttribute(t))}var z={OPTION:function(e,r){var t=e.parentNode;if(t){var n=t.nodeName.toUpperCase();n===\"OPTGROUP\"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n===\"SELECT\"&&!t.hasAttribute(\"multiple\")&&(e.hasAttribute(\"selected\")&&!r.selected&&(e.setAttribute(\"selected\",\"selected\"),e.removeAttribute(\"selected\")),t.selectedIndex=-1)}G(e,r,\"selected\")},INPUT:function(e,r){G(e,r,\"checked\"),G(e,r,\"disabled\"),e.value!==r.value&&(e.value=r.value),r.hasAttribute(\"value\")||e.removeAttribute(\"value\")},TEXTAREA:function(e,r){var t=r.value;e.value!==t&&(e.value=t);var n=e.firstChild;if(n){var a=n.nodeValue;if(a==t||!t&&a==e.placeholder)return;n.nodeValue=t}},SELECT:function(e,r){if(!r.hasAttribute(\"multiple\")){for(var t=-1,n=0,a=e.firstChild,d,u;a;)if(u=a.nodeName&&a.nodeName.toUpperCase(),u===\"OPTGROUP\")d=a,a=d.firstChild;else{if(u===\"OPTION\"){if(a.hasAttribute(\"selected\")){t=n;break}n++}a=a.nextSibling,!a&&d&&(a=d.nextSibling,d=null)}e.selectedIndex=t}}},L=1,ve=11,k=3,W=8;function w(){}function pe(e){if(e)return e.getAttribute&&e.getAttribute(\"id\")||e.id}function he(e){return function(t,n,a){if(a||(a={}),typeof n==\"string\")if(t.nodeName===\"#document\"||t.nodeName===\"HTML\"||t.nodeName===\"BODY\"){var d=n;n=c.createElement(\"html\"),n.innerHTML=d}else n=ue(n);var u=a.getNodeKey||pe,h=a.onBeforeNodeAdded||w,A=a.onNodeAdded||w,v=a.onBeforeElUpdated||w,g=a.onElUpdated||w,Q=a.onBeforeNodeDiscarded||w,N=a.onNodeDiscarded||w,Z=a.onBeforeElChildrenUpdated||w,C=a.childrenOnly===!0,S=Object.create(null),O=[];function M(s){O.push(s)}function J(s,l){if(s.nodeType===L)for(var i=s.firstChild;i;){var o=void 0;l&&(o=u(i))?M(o):(N(i),i.firstChild&&J(i,l)),i=i.nextSibling}}function x(s,l,i){Q(s)!==!1&&(l&&l.removeChild(s),N(s),J(s,i))}function K(s){if(s.nodeType===L||s.nodeType===ve)for(var l=s.firstChild;l;){var i=u(l);i&&(S[i]=l),K(l),l=l.nextSibling}}K(t);function F(s){A(s);for(var l=s.firstChild;l;){var i=l.nextSibling,o=u(l);if(o){var p=S[o];p&&R(l,p)?(l.parentNode.replaceChild(p,l),H(p,l)):F(l)}else F(l);l=i}}function ee(s,l,i){for(;l;){var o=l.nextSibling;(i=u(l))?M(i):x(l,s,!0),l=o}}function H(s,l,i){var o=u(l);o&&delete S[o],!(!i&&(v(s,l)===!1||(e(s,l),g(s),Z(s,l)===!1)))&&(s.nodeName!==\"TEXTAREA\"?te(s,l):z.TEXTAREA(s,l))}function te(s,l){var i=l.firstChild,o=s.firstChild,p,b,y,U,T;e:for(;i;){for(U=i.nextSibling,p=u(i);o;){if(y=o.nextSibling,i.isSameNode&&i.isSameNode(o)){i=U,o=y;continue e}b=u(o);var _=o.nodeType,m=void 0;if(_===i.nodeType&&(_===L?(p?p!==b&&((T=S[p])?y===T?m=!1:(s.insertBefore(T,o),b?M(b):x(o,s,!0),o=T):m=!1):b&&(m=!1),m=m!==!1&&R(o,i),m&&H(o,i)):(_===k||_==W)&&(m=!0,o.nodeValue!==i.nodeValue&&(o.nodeValue=i.nodeValue))),m){i=U,o=y;continue e}b?M(b):x(o,s,!0),o=y}if(p&&(T=S[p])&&R(T,i))s.appendChild(T),H(T,i);else{var $=h(i);$!==!1&&($&&(i=$),i.actualize&&(i=i.actualize(s.ownerDocument||c)),s.appendChild(i),F(i))}i=U,o=y}ee(s,o,b);var j=z[s.nodeName];j&&j(s,l)}var f=t,D=f.nodeType,X=n.nodeType;if(!C){if(D===L)X===L?R(t,n)||(N(t),f=ce(t,fe(n.nodeName,n.namespaceURI))):f=n;else if(D===k||D===W){if(X===D)return f.nodeValue!==n.nodeValue&&(f.nodeValue=n.nodeValue),f;f=n}}if(f===n)N(t);else{if(n.isSameNode&&n.isSameNode(f))return;if(H(f,n,C),O)for(var I=0,re=O.length;I<re;I++){var V=S[O[I]];V&&x(V,V.parentNode,!1)}}return!C&&f!==t&&t.parentNode&&(f.actualize&&(f=f.actualize(t.ownerDocument||c)),t.parentNode.replaceChild(f,t)),f}}var Ae=he(ne),Y=Ae;function B(e){let r=e.starter;if(e.id){let t=document.getElementById(e.id);if(!t)throw new Error(`Error while locating root with id: can't find direct with ${e}`);r=t}else{let t=0;for(;;){if(!r.parentElement)throw new Error(`Error while locating root: can't find parent with ${e}`);if(!r.getAttribute(\"state\"))r=r.parentElement;else if(e.depth&&t!=e.depth)r=r.parentElement,t++;else break}}return r}function ge(e){return e.includes(\":\")&&(e=e.split(\":\")[1]),e.includes(\"$\")&&(e=e.replaceAll(\"$\",\"\")),e}function be(e){e.querySelectorAll(\"[ssa\\\\:oncall\\\\.display]\").forEach(t=>{let n=t.getAttribute(\"ssa:oncall.display\");n!=\"\"&&t.setAttribute(\"style\",\"display: \"+n)})}function Te(){document.querySelectorAll(\"[ssa\\\\:onload]\").forEach(e=>{let r=e.getAttribute(\"ssa:onload\");r&&r!=\"\"&&E(e,r)})}function me(){document.querySelectorAll(\"[ssa\\\\:poll]\").forEach(e=>{let r=e.getAttribute(\"ssa:poll\")||\"\",t=e.getAttribute(\"ssa:poll.interval\");r&&r!=\"\"&&t&&t!=\"\"&&setInterval(()=>{E(e,r)},parseInt(t))})}function we(){document.querySelectorAll(\"[ssa\\\\:onintersect]\").forEach(e=>{let r=e.getAttribute(\"ssa:onintersect\")||\"\",t=e.getAttribute(\"ssa:onintersect.threshold\")||\"1.0\";r!=\"\"&&new IntersectionObserver(a=>{a.forEach(d=>{d.intersectionRatio>=parseFloat(t)&&E(e,r,parseFloat(t))})},{threshold:parseFloat(t)}).observe(e)})}function E(e,r,...t){return new Promise((n,a)=>{let d=B({starter:e,depth:r.split(\"\").filter(A=>A===\"$\").length,id:r.includes(\":\")?r.split(\":\")[0]:void 0});be(d);let u=ssapath;u+=`/${d.getAttribute(\"name\")}`,u+=`/${d.getAttribute(\"state\")||\"{}\"}`,u+=`/${ge(r)}`,u+=`/${btoa(JSON.stringify(t)).replaceAll(\"/\",\"-\")}`;let h=new EventSource(u);h.onmessage=A=>{let v=A.data;if(!!v){if(v.startsWith(\"ssa:redirect=\")){let g=v.replace(\"ssa:redirect=\",\"\");window.location.href=g;return}if(d.getAttribute(\"ssa:render.mode\")==\"replace\"){d.outerHTML=v;return}try{Y(d,v)}catch(g){console.log(\"Fallback from morphdom to root.outerHTML due to error\",g),d.outerHTML=v}}},h.onerror=A=>{h.close(),n()}})}function Se(e,r){let t=B({starter:e,depth:r.split(\"\").filter(a=>a===\"$\").length,id:r.includes(\":\")?r.split(\":\")[0]:void 0});if(!t.getAttribute(\"state\"))throw new Error(\"Bind call error: component state is underfined\");let n=JSON.parse(atob(t.getAttribute(\"state\")));n[r]=e.value,t.setAttribute(\"state\",btoa(JSON.stringify(n).replaceAll(\"/\",\"-\")))}function ye(e,r){r.preventDefault();let t=B({starter:e});if(!t.getAttribute(\"state\"))throw new Error(\"Bind call error: component state is underfined\");let n=JSON.parse(atob(t.getAttribute(\"state\"))),a=new FormData(r.target),d=Object.fromEntries(a.entries());return Object.entries(d).forEach(u=>{n[u[0]]=u[1]}),t.setAttribute(\"state\",btoa(JSON.stringify(n).replaceAll(\"/\",\"-\"))),E(t,\"Submit\"),!1}window._LocaleRoot=B;window.Action=E;window.Bind=Se;window.FormSubmit=ye;document.addEventListener(\"DOMContentLoaded\",Te);document.addEventListener(\"DOMContentLoaded\",we);document.addEventListener(\"DOMContentLoaded\",me);})();</script>"

payload/src/dynamics.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export function Action(self: HTMLElement, action: string, ...args: Array<any>):
126126
url += `/${root.getAttribute('name')}` // Component name
127127
url += `/${root.getAttribute('state') || '{}'}` // Component state
128128
url += `/${_NameCleanup(action)}` // Action name
129-
url += `/${btoa(JSON.stringify(args).replaceAll('/', '-'))}` // Action arguments
129+
url += `/${btoa(JSON.stringify(args)).replaceAll('/', '-')}` // Action arguments
130130
// Make request
131131
let es = new EventSource(url)
132132
// Handle response chunks
@@ -182,7 +182,7 @@ export function Bind(self: HTMLElement, field: string) {
182182
// Set value
183183
state[field] = (self as HTMLInputElement).value
184184
// Set state
185-
root.setAttribute('state', btoa(JSON.stringify(state).replaceAll('/', '%2F')))
185+
root.setAttribute('state', btoa(JSON.stringify(state).replaceAll('/', '-')))
186186
}
187187

188188
export function FormSubmit(self: HTMLElement, e: Event) {
@@ -205,7 +205,7 @@ export function FormSubmit(self: HTMLElement, e: Event) {
205205
state[pair[0]] = pair[1]
206206
})
207207
// Set state
208-
root.setAttribute('state', btoa(JSON.stringify(state).replaceAll('/', '%2F')))
208+
root.setAttribute('state', btoa(JSON.stringify(state).replaceAll('/', '-')))
209209
// Trigger "Submit" action
210210
Action(root, 'Submit')
211211
// Fix for ...?

0 commit comments

Comments
 (0)