回答編集履歴
2
ミスがあったため修正。
test
CHANGED
@@ -1,11 +1,5 @@
|
|
1
1
|
```PHP
|
2
2
|
|
3
|
-
<script>alert(<?php echo
|
3
|
+
<script>alert(<?php echo $sample; ?>)</script>
|
4
4
|
|
5
5
|
```
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
【「何故htmlspecialcharsを通すのか?」を一言でどうぞ - Qiita】
|
10
|
-
|
11
|
-
[https://qiita.com/mpyw/items/19e6fed835ccdbcb0d6d](https://qiita.com/mpyw/items/19e6fed835ccdbcb0d6d)
|
1
ミスがあったため修正。
test
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
```PHP
|
2
2
|
|
3
|
-
<script>alert(<?php echo $sample;?>)</script>
|
3
|
+
<script>alert(<?php echo htmlspecialchars( $sample, ENT_QUOTES, 'UTF-8' );?>)</script>
|
4
4
|
|
5
5
|
```
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
【「何故htmlspecialcharsを通すのか?」を一言でどうぞ - Qiita】
|
10
|
+
|
11
|
+
[https://qiita.com/mpyw/items/19e6fed835ccdbcb0d6d](https://qiita.com/mpyw/items/19e6fed835ccdbcb0d6d)
|