You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Facebook provides embedded post now, but it's format like follow:
<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-post" data-href="https://www.facebook.com/photo.php?fbid=596538790367955&set=a.170672256287946.33622.151274568227715&type=1"><div class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/photo.php?fbid=596538790367955&set=a.170672256287946.33622.151274568227715&type=1">Post</a> by <a href="https://www.facebook.com/TheBritishMonarchy">The British Monarchy</a>.</div></div>
Cause it use js directly, so it'll be encoded and do not work after generate.
I also consider tag but it has dynamic content so might not possible to implement one. Also try raw tag but it did not work like my thought. (I hope the content between raw and endraw will keep it's format, but seem it still got encoded)
Any better solution to do this? thanks
The text was updated successfully, but these errors were encountered:
I found the root cause of this issue, I think raw tag didn't work correctly.
hexo use swig to parse and compile tag inside the post, but actually swig has a tag called raw too. So it didn't add escape tag to it, so the content will be escaped.
Can hexo change the naming of raw tag?
Just make sure it's different from those that swig's already defined. (maybe rawblock?)
Facebook provides embedded post now, but it's format like follow:
Cause it use js directly, so it'll be encoded and do not work after generate.
I also consider tag but it has dynamic content so might not possible to implement one. Also try
raw
tag but it did not work like my thought. (I hope the content between raw and endraw will keep it's format, but seem it still got encoded)Any better solution to do this? thanks
The text was updated successfully, but these errors were encountered: