OSDN Git Service
(root)
/
hengband
/
web.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e778ae9
)
[add]共通関数群ファイル追加
author
Habu
<habu@users.sourceforge.jp>
Fri, 30 Mar 2018 11:16:43 +0000
(20:16 +0900)
committer
Habu
<habu@users.sourceforge.jp>
Fri, 30 Mar 2018 11:16:43 +0000
(20:16 +0900)
score/common.inc
[new file with mode: 0644]
patch
|
blob
diff --git a/score/common.inc
b/score/common.inc
new file mode 100644
(file)
index 0000000..
2044153
--- /dev/null
+++ b/
score/common.inc
@@ -0,0
+1,13
@@
+<?php
+/**
+ * 特殊文字をHTMLエンティティに変換する
+ *
+ * htmlspecialcharsのラッパー
+ *
+ * @param string $str 変換元の文字列
+ * @return string 変換後の文字列
+ */
+function h($str)
+{
+ return htmlspecialchars($str, ENT_QUATES|ENT_HTML5, "UTF-8");
+}