您正在使用
text/plain
MIME 类型的变体进行输出。您需要使用默认标头 (text/html
) 发送它,以便浏览器正确解析它。
例如:
<?php
header('Content-Type: text/html', true);
echo showtime_schedule_handler($atts, $content);
?>
而不是
return $output;
尝试
return html_entity_decode($output);
用途:
return htmlspecialchars($output, ENT_QUOTES);
此函数将特殊字符转换为 HTML 实体。使用 ENT_QUOTES 确保双引号和单引号都被编码。