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

[Bug] When the advanced orchestration application demonstration, if the default value of the interface parameter is in Chinese, the browser will transcode it. When the parameter is transmitted to the function, it is also the content after the browser transcodes it, resulting in the function execution. The parameters are incorrect #2268

Open
spritelyl opened this issue Feb 13, 2025 · 2 comments
Assignees

Comments

@spritelyl
Copy link

Contact Information

14707070227

MaxKB Version

v1.10.0

Problem Description

高级编排应用演示时,接口传参的默认值是中文的话,浏览器会转码,传参到函数时也是浏览器转码后的内容,导致函数执行时的参数不对

Steps to Reproduce

  1. 高级编排中添加接口参数name,并填写中文默认值

Image

  1. 对接函数,并把接口参数传给函数作为入参,返回输出结果.

Image

  1. 应用保存发布,测试应用,发现浏览器会转码,传参到函数时也是浏览器转码后的内容,导致函数执行时的参数不对

Image

Image

The expected correct result

接口传参的默认值是中文的话,浏览器转码后,传参到函数时接口参数不会被转码。

Related log output

Additional Information

No response

@shaohuzhang1 shaohuzhang1 changed the title [Bug] 高级编排应用演示时,接口传参的默认值是中文的话,浏览器会转码,传参到函数时也是浏览器转码后的内容,导致函数执行时的参数不对 [Bug] When the advanced orchestration application demonstration, if the default value of the interface parameter is in Chinese, the browser will transcode it. When the parameter is transmitted to the function, it is also the content after the browser transcodes it, resulting in the function execution. The parameters are incorrect Feb 13, 2025
@liuruibin
Copy link
Member

URL中带中文必须进行urlencode才能正常使用,这里有两个建议

  1. url不带中文
  2. 脚本里自行urldecode

@shaohuzhang1
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The URL with Chinese must be urlencode to use normally. Here are two suggestions

  1. The url does not contain Chinese
  2. Uldecode it yourself in the script

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

4 participants