cochoo回答ポイント 500ptウォッチ 1

【大至急】chromeで「form action="以降が展開されない事象が発生して困っています。


test.phpで生成された入力フォームのバリエーションをindex.html上で統一表示しようとしています。

●環境
chrome:77.0.3865.120(XSS AuthorはON)
firefox:70.0

●test.php
<?php
$content .= "<form action='send.php' method='POST'>";
$content .= "<input type='submit' class='button' name='set' value='設定'>";
$content .= "</form>";
?>
<form method="post" action="index.html">
<input type="hidden" name="POST_DATA" value="' . $content . '">
</form>
<script>document.forms[0].submit();</script>

●index.html
<?php echo $_POST['POST_DATA']; ?>

test.phpをブラウザ上で実行すると、firefoxではindex.htmlは結果[A]で表示されますが、chromeでは結果[B]となり、困っています。

■結果[A] … firefoxでの実行結果
<form action="send.php" method="POST"> ← 正しく展開されている
<input type="submit" class="button" name="set" value="設定">
</form>

■結果[B] … chromeでの実行結果
<form action="data:," method="POST"> ←「form action="」以降が「data:,」となっている
<input type="submit" class="button" name="set" value="設定">
</form>

POSTで飛ばした際にchromeは何をしているのかわかりませんが、アドバイスいただけると幸いです。
何卒よろしくお願いいたします。

※ 有料アンケート・ポイント付き質問機能は2023年2月28日に終了しました。
ログインして回答する

ベストアンサー

その他の回答

この質問へのコメント

コメントはありません

この質問への反応(ブックマークコメント)

質問の情報

登録日時
2019-10-25 02:09:24
終了日時
2019-10-31 17:52:22
回答条件
1人1回まで

この質問のカテゴリ

この質問に含まれるキーワード

firefox2005PHP7798XSS23chrome570HTML5036?D197

人気の質問

メニュー

PC版