Php 关于_e()函数的嵌套转义

Php 关于_e()函数的嵌套转义,php,wordpress,escaping,translation,Php,Wordpress,Escaping,Translation,关于stackoverflow的第一个问题:我想先在php中转义html,然后再在html php中转义,并从一个_e()函数返回一个字符串。我不确定“行话”是否正确。因此,情况如下: return '...<span class="strike"></span><a class="read-more" href="'. get_permalink($post->ID) . '" title="'.get_the_title($post->ID).'"

关于stackoverflow的第一个问题:我想先在php中转义html,然后再在html php中转义,并从一个_e()函数返回一个字符串。我不确定“行话”是否正确。因此,情况如下:

return '...<span class="strike"></span><a class="read-more" href="'. 
get_permalink($post->ID) . '" title="'.get_the_title($post->ID).'">Read more</a>';
能够翻译这个术语

我什么都试过了。感谢所有帮助。

如何:

return '...<span class="strike"></span><a class="read-more" href="'. 
get_permalink($post->ID) . '" title="'.get_the_title($post->ID).'">'._e( 'Read more', 'mytheme' ).'</a>';
返回“…”;

您可能需要调用
htmlspecialchars()
\u e()
的结果进行调用,以转义字符串中的HTML。嘿,汤姆,非常感谢。但不幸的是,在这个版本中,短语(待翻译)的链接字符丢失了。
return '...<span class="strike"></span><a class="read-more" href="'. 
get_permalink($post->ID) . '" title="'.get_the_title($post->ID).'">'._e( 'Read more', 'mytheme' ).'</a>';