admin管理员组文章数量:1431307
I'm trying to set some <span>
tags in the bloginfo description. So I put this in the blog description field:
<span class="name">Archive | Navarro Vives</span> <span>is a point of reference</span> <span>for those who wish to</span> <span>find out more about the life and work of Josep Navarro Vives.</span>
bloginfo('description')
returns this string:
<span class="name">Archive | Navarro Vives</span> <span>is a point of reference</span> <span>for those who wish to</span> <span>find out more about the life and work of Josep Navarro Vives.</span>
And it is printed in the browser as <span class="name">Archive | Navarro...etc
(with escaped tags).
I tried to:
$description = bloginfo('description');
echo html_entity_decode($description);
but it returns exactly the same as bloginfo('description').
How can I unescape these <span>
tags?
I'm trying to set some <span>
tags in the bloginfo description. So I put this in the blog description field:
<span class="name">Archive | Navarro Vives</span> <span>is a point of reference</span> <span>for those who wish to</span> <span>find out more about the life and work of Josep Navarro Vives.</span>
bloginfo('description')
returns this string:
<span class="name">Archive | Navarro Vives</span> <span>is a point of reference</span> <span>for those who wish to</span> <span>find out more about the life and work of Josep Navarro Vives.</span>
And it is printed in the browser as <span class="name">Archive | Navarro...etc
(with escaped tags).
I tried to:
$description = bloginfo('description');
echo html_entity_decode($description);
but it returns exactly the same as bloginfo('description').
How can I unescape these <span>
tags?
1 Answer
Reset to default 1I found the answer. just replace
bloginfo('description')
by get_bloginfo('description')
So
echo html_entity_decode(get_bloginfo('description'))
Works as expected.
本文标签: phpHTML tags in bloginfo description
版权声明:本文标题:php - HTML tags in bloginfo description 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745571248a2664061.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论