You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you very much for that piece of free software :-) I've been using happily for a long time and it works well expect for this edge case which has been rather painful for me. To the best of my knowledge there is no issue about this so I fill this one just to reference this behaviour.
According to Wikipedia (and explained in a very circumlocutory way on https://url.spec.whatwg.org/) the syntax of a URL is :
However, when secretary is used without html5 routing the in-app route is stored in the fragment and then the query part is added. Reasons for this are obvious (legibility) but resulting URL respect no longer the syntax. Instead, they use this custom syntax:
fragment: "path/inside/app?query=params&as=defined&by=secretary" for standard libraries but should be "path/inside/app" according to Secretary
query: "" but should be "query=params&as=defined&by=secretary" according to Secretary
Of course, a very naive regex will get us data we need:
(defhash-according-to-secretary-syntax
(comp second (partial re-find #"\#([^?]*)"))
I just wonder if you could add tiny functions somewhere in a utility namespace to allow Secretary's users to access fragment and query as meant by the custom syntax used. If you agree with this but don't have much time to spare on this detail, just give me general directions about where / how put new code and I'll be happy to do that.
The text was updated successfully, but these errors were encountered:
Yeah, we all have either ideas but no time or time but no ideas ^^ I would happen to have not much time and even fewer ideas but I'd be glad to give it a try and see if I can contribute on that.
However I think it's enough to merely add some words about that in the readme. I issued a pull request for that.
Hiya there,
First of all, thank you very much for that piece of free software :-) I've been using happily for a long time and it works well expect for this edge case which has been rather painful for me. To the best of my knowledge there is no issue about this so I fill this one just to reference this behaviour.
According to Wikipedia (and explained in a very circumlocutory way on https://url.spec.whatwg.org/) the syntax of a URL is :
However, when secretary is used without html5 routing the in-app route is stored in the fragment and then the query part is added. Reasons for this are obvious (legibility) but resulting URL respect no longer the syntax. Instead, they use this custom syntax:
Using this custom syntax will cause Secretary and Standard libraries to firmly disagree on some painful edge cases, e.g. :
"path/inside/app?query=params&as=defined&by=secretary"
for standard libraries but should be"path/inside/app"
according to Secretary""
but should be"query=params&as=defined&by=secretary"
according to SecretaryOf course, a very naive regex will get us data we need:
I just wonder if you could add tiny functions somewhere in a utility namespace to allow Secretary's users to access fragment and query as meant by the custom syntax used. If you agree with this but don't have much time to spare on this detail, just give me general directions about where / how put new code and I'll be happy to do that.
The text was updated successfully, but these errors were encountered: