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

起動時にプロジェクトファイルを読み込む場合に行うエンコード処理の漏れを修正 #1972

Merged
merged 348 commits into from
Apr 7, 2024

Conversation

madosuki
Copy link
Contributor

@madosuki madosuki commented Apr 1, 2024

内容

encodeURIComponentを使うようにしました.#=+&/などがエンコードされるようになります.

関連 Issue

close #1970

スクリーンショット・動画など

その他

@madosuki madosuki requested a review from a team as a code owner April 1, 2024 08:01
@madosuki madosuki requested review from y-chan and removed request for a team April 1, 2024 08:01
Copy link
Member

@sevenc-nanashi sevenc-nanashi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMです。

が、そもそもこれの原因はURLクエリ作成を手動でやってるからな気がします:

async function loadUrl(obj: {
  isMultiEngineOffMode?: boolean;
  projectFilePath?: string;
}) {
  const fragment =
    `?isMultiEngineOffMode=${obj?.isMultiEngineOffMode ?? false}` +
    `&projectFilePath=${obj?.projectFilePath ?? ""}`;
  return win.loadURL(`${firstUrl}${fragment}`);
}

これをURLSearchParamsで書き換えるのが正しい解決かも?

@madosuki
Copy link
Contributor Author

madosuki commented Apr 1, 2024

それはそうですね.
ついでにURLオブジェクト使うようにして直接文字列結合をしない処理に変更しました.

Copy link
Member

@sevenc-nanashi sevenc-nanashi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

実際にprojectFilePath#付きプロジェクトファイルを与えてみて大丈夫なことを確認しました!
プルリクエストありがとうございます、もしよければまた、ぜひ・・・!!

@Hiroshiba Hiroshiba merged commit 3f19667 into VOICEVOX:main Apr 7, 2024
9 checks passed
@madosuki madosuki deleted the fix_url_encode_omission branch July 5, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants