增加函数统一处理markdown
This commit is contained in:
@@ -118,19 +118,21 @@ if ($pr_flag) {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<?php
|
||||||
|
function trans_md($str)
|
||||||
|
{
|
||||||
|
return bbcode_to_html("<span class='md'>" + bbcode_to_html(
|
||||||
|
htmlentities($str, ENT_QUOTES, 'UTF-8')
|
||||||
|
) + "</span>");
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h4 class="ui top attached block header"><?php echo $MSG_Description ?></h4>
|
<h4 class="ui top attached block header"><?php echo $MSG_Description ?></h4>
|
||||||
<div id="description" class="ui bottom attached segment font-content">
|
<div id="description" class="ui bottom attached segment font-content">
|
||||||
<span class='md'>
|
<?php
|
||||||
<?php
|
echo trans_md($row['description']);
|
||||||
echo bbcode_to_html(
|
?>
|
||||||
htmlentities ($row['description'], ENT_QUOTES, 'UTF-8')
|
|
||||||
);
|
|
||||||
?>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -139,14 +141,9 @@ if ($pr_flag) {
|
|||||||
<div class="column">
|
<div class="column">
|
||||||
<h4 class="ui top attached block header"><?php echo $MSG_Input ?></h4>
|
<h4 class="ui top attached block header"><?php echo $MSG_Input ?></h4>
|
||||||
<div id='input' class="ui bottom attached segment font-content">
|
<div id='input' class="ui bottom attached segment font-content">
|
||||||
<span class='md'>
|
<?php
|
||||||
<?php echo
|
echo trans_md($row['input']);
|
||||||
bbcode_to_html(
|
?>
|
||||||
htmlentities ($row['input'], ENT_QUOTES, 'UTF-8')
|
|
||||||
);
|
|
||||||
?>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -156,14 +153,9 @@ if ($pr_flag) {
|
|||||||
<div class="column">
|
<div class="column">
|
||||||
<h4 class="ui top attached block header"><?php echo $MSG_Output ?></h4>
|
<h4 class="ui top attached block header"><?php echo $MSG_Output ?></h4>
|
||||||
<div id='output' class="ui bottom attached segment font-content">
|
<div id='output' class="ui bottom attached segment font-content">
|
||||||
<span class='md'>
|
<?php
|
||||||
<?php echo
|
echo trans_md($row['output']);
|
||||||
bbcode_to_html(
|
?>
|
||||||
htmlentities ($row['output'], ENT_QUOTES, 'UTF-8')
|
|
||||||
);
|
|
||||||
?>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -213,14 +205,9 @@ if ($pr_flag) {
|
|||||||
<div class="column">
|
<div class="column">
|
||||||
<h4 class="ui top attached block header"><?php echo $MSG_HINT ?></h4>
|
<h4 class="ui top attached block header"><?php echo $MSG_HINT ?></h4>
|
||||||
<div id='hint' class="ui bottom attached segment font-content hint">
|
<div id='hint' class="ui bottom attached segment font-content hint">
|
||||||
<span class='md'>
|
<?php
|
||||||
<?php echo
|
echo trans_md($row['hint']);
|
||||||
bbcode_to_html(
|
?>
|
||||||
htmlentities ($row['hint'], ENT_QUOTES, 'UTF-8')
|
|
||||||
);
|
|
||||||
?>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user