xxxi имеет the_title()
, который возвращает некоторый текст, в этом случае Blue & Whiny
проблема, как мы видим, заключается в том, что символ & выглядит иначе
как мне повернуть Blue & Whiny
в Blue & Whiny
я попробовал: htmlspecialchars_decode(the_title())
, html_entity_decode(the_title())
, htmlspecialchars(the_title())
и ничего.
я хочу преобразовать &
в &
там не так много кодачтобы поделиться, я просто делаю это: <?php the_title() ?>
и я получаю Blue & Whiny
.Если я использую get_the_title()
, то ничего не отобразится
Есть идеи?Спасибо
edit1.Я поделюсь кодом:
<script type="text/javascript">
function showShareUI() {
var act = new gigya.services.socialize.UserAction();
act.setUserMessage("Check out this article.");
act.setTitle("Trends on Explore Talent - <?php the_title(); ?>");
act.setDescription("<?php get_the_content(); ?>");
act.setLinkBack("<?php the_permalink(); ?>");
act.addActionLink("Check out this article", "<?php the_permalink(); ?>");
var image = {
src: 'http://xxx.com/wp-content/uploads/2011/05/BOTTOM_BANNER.jpg',
href: '<?php the_permalink();?>',
type: 'image'
}
act.addMediaItem(image);
var params =
{
userAction: act, // The UserAction object enfolding the newsfeed data.
onError: onError, // onError method will be summoned if an error occurs.
onSendDone: onSendDone // onError method will be summoned after
,showEmailButton: true
// Gigya finishes the publishing process.
};
gigya.services.socialize.showShareUI(conf, params);
}
function onError(event) {
alert('An error has occured' + ': ' + event.errorCode + '; ' + event.errorMessage);
}
function onSendDone(event)
{
document.getElementById('status').style.color = "green";
document.getElementById('status').innerHTML = 'The newsfeed has been posted to: ' + event.providers;
}
</script>
Я все перепробовал.Это начинает раздражать меня ...