Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'&' character in param breaking callFmpURL() in Windows #2

Open
jwillinghalpern opened this issue Jul 11, 2018 · 2 comments
Open

'&' character in param breaking callFmpURL() in Windows #2

jwillinghalpern opened this issue Jul 11, 2018 · 2 comments

Comments

@jwillinghalpern
Copy link

jwillinghalpern commented Jul 11, 2018

Hey, I encountered a strange bug on Windows. when I call callFmpURL and the param includes an "&" character, filemaker doesn't receive the whole parameter. It stops at the & character. In my test this url yields the following script parameters in filemaker:

The url reported by fmajax: fmp://$/WillingCalendar_Dev_103?script=wCal%3A%20Handle%20Click&param=%7B%22title%22%3A%22the%20boy%20%26%20the%20basketball%22%7D

On Windows: {"title":"the boy

On Mac: {"title":"the boy & the basketball"}

If I then paste the exact same url in my Internet Explorer browser, Filemaker receives the correct parameter.

Is this because the & is used to separate the url get params like url?param=abc&x=def&y=ghi ?

@jwillinghalpern
Copy link
Author

Update: after playing with it, I found that for Windows, wrapping the url generated in callFmpURL() like encodeURI(url) fixed problem. However, that breaks the function for mac. I'm not really sure the best way to approach this discrepancy, but thought I'd share.

@jwillinghalpern
Copy link
Author

I sent a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant