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