I have two rmarkdown generate html reports.
The first one (rmarkdown version 1.10, pandoc version 2.7.1)with R is working fine
The second one (rmarkdown version 2.2, pandoc version 2.7.1) had black diamond with questions marks show up in places with html characters.
I compared the two documents, and it seems that the only differences are in the headings of the html document.
In the first document, the heading is as following
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
In the second document, the heading is as following
<html>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
I am opening both with Chrome. Can someone help explain why this might be happending?
Thank you!
Related
i'm currently going a thumbnails generator for my site and maybe other people can use it so what this does is to generate a html file and that file get instant uploaded to the webhost so the file looks like the following code but the issue that facebook saying they didn't detect the og: title and description and image ... weird maybe i'm doing something wrong or the code is wrong ?
Just to note i use the facebook debug to scrape it and check : https://developers.facebook.com/tools/debug/sharing/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="ar" dir="rtl" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta property="fb:admins" content="John.Evenetcha"/>
<meta property="fb:app_id" content="2217370698541973"/>
<meta property="og:locale" content="ar_AR">
<title> تيار المحبة </title>
<meta name="description" content="القيادي بحزب تيار المحبة حسام الهمادي ينفي اشاعة التحالف مع نداء تونس ويصفها">
<meta name="Keywords" content="Tayar Al Mahaba" />
<meta property="article:author" content="https://www.facebook.com/John.Evenetcha" />
<meta property="article:publisher" content="https://www.facebook.com/John.Evenetcha" />
<meta property="og:type" content="article" />
<meta property="og:title" content="تيار المحبة"/>
<meta property="og:image" content="https://scontent.ftun2-1.fna.fbcdn.net/v/t1.0-9/44410830_2120345971363361_6384115955156385792_n.jpg?_nc_cat=111&_nc_ht=scontent.ftun2-1.fna&oh=246eea65cc7fddd40108f6bd8f840876&oe=5C52445D"/>
<meta property="og:site_name" content="تيار المحبة"/>
<meta property="og:description" content="القيادي بحزب تيار المحبة حسام الهمادي ينفي اشاعة التحالف مع نداء تونس ويصفها"/>
<meta http-equiv="REFRESH" content="0;url=https://tayar-al-mahaba.cf/TAM/news/view/9">
<BODY>
Redirecting...
</BODY>
</head>
</html>
Solved the issue! the problem was that i generate it using VB.NET and got System.Text.Encoding.Unicode in the rewrite method i though that will make it good :D
Currently I am trying to display Korean Language characters on my website but instead it's displaying text which looks like ??? where the Korean language should be.
You can seen an example in the screen shot below.
I have tried to add the following to my meta and no luck.
<meta http-equiv="content-language" content="ko"/>
<html lang="ko" xmlns="http://www.w3.org/1999/xhtml">
Here's the current structure of my head content.
<!DOCTYPE html>
<html lang="ko" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta charset="UTF-8" >
<!-- <meta http-equiv="content-language" content="ko"/> === commented out as it didn't do anything.-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<meta property="og:image" content="" />
<meta property="og:url" content="" />
<meta property="og:title" content="" />
<meta property="og:type" content="website" />
<meta name="keywords" content="" />
<meta name="description" content="" />
</head>
EDIT: I have viewed some of the following questions and they did NOT help solve my issue. Question 1 & Question 2.
The meta tag
<meta http-equiv="content-language" content="ko"/>
is not declaring the encoding of the text. It is only a clue to search engines that your page is in the language specified. The lang attribute has the same effect.
You should use the charset attribute:
<meta charset="UTF-8">
What html version is code snippet below?
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="some info here ..." />
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
Lets go line by line
<!DOCTYPE html> - HTML5 Doctype
<html xmlns="http://www.w3.org/1999/xhtml"> - Refer here
<head> - Document head element
<meta name="Generator" content="some info here ..." /> Description of the program you used to create the HTML document
<meta charset="utf-8" /> - Document Character Encoding, Good read
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> Read Here And Here
I would've certainly wrote a big fat description for each but realized that these were already asked in different questions, so thought to link them instead of repeating the same thing here again.
The code snippet is mostly the start of an HTML5 document in XHTML (XML) serialization, sometimes confusingly called XHTML5.
It is not a conforming document, however; the current HTML5 CR does not allow the attribute http-equiv="X-UA-Compatible" (on rather formal grounds, but still).
The doctype belongs to HTML5 Doctype definition.
So the rest of the document should be bases on HTML5
I just checked my site is not working in facebook.
I have added facebook meta tags for title, description, thumbnail image.
I checked my site and found it is working and i can share links in windows 7
But i checked today in windows 8 and linux. (ubuntu and fedora)
They are not working and i am not able to share links.
I checked the debug link which is also working and scrapping the link details in windows 7. But it is not working in linux and windows 8.
What could be the problem in my site?
I suspect meta tags.
meta tags are inclued in head tag.
That was my doctype and html tag
<meta property="og:title" content="<?php echo $fb_title; ?>"/>
<meta property="og:url" content="<?php echo $fb_url;?>"/>
<meta property="og:image" content="images/<?php echo $fb_images;?>"/>
<meta property="og:site_name" content="<?php echo $fb_page_name;?>"/>
<meta property="fb:admins" content="my_id"/>
<meta property="og:description" content="<?php echo $fb_description;?>"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
You can test the result by using this facebook link.
If you don't know it yet, you're using Open Graph Protocol.
You have to put meta inside <head /> part.
For my part, I use this DOM when i wan't to add Facebook button :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" >
<head>
<title>My site</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="author" content="JoDev, France" />
<meta name="keywords" content="some, word, that, can, resume, the, site" />
<meta property="og:title" content="My site title" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://url.to/your/site" />
<meta property="og:image" content="http://url.to/your/preview/image" />
<meta property="og:site-name" content="My Site name" />
<meta property="og:description" content="Using this, you will be able to reach for the moon" />
I'm using Facebooks' Open Graph protocol :
http://developers.facebook.com/docs/reference/plugins/like/
Here's code for a test page. My understanding is that when someone "likes" this, the image icon that placed in the post on their
page should be the one specified in og:image, and the linkable url in the post should be the one specified in og:url.
In reality, it seems to truncate the URL to the domain, and instead of using the image provided it picks one seemingly at random (my guess is it's just taking the first image it sees from a scan or specified elsewhere in the code).
Am I doing anything obviously wrong here?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>My Site</title>
<meta property="og:title" content="My Site Title" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://www.mysite.org/videos/index/16922653" />
<meta property="og:image" content="http://b.vimeocdn.com/ts/104/367/104367616_200.jpg" />
<meta property="og:site_name" content="My Site" />
<meta property="og:app_id" content="5555555555" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="image_src" href="http://b.vimeocdn.com/ts/104/367/104367616_200.jpg" />
</head>
<body>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like href="http://www.mysite.org/videos/index/16922653" show_faces="false" width="450" />
</body>
</html>
Update: #echese
Good suggestion. Ran it, got this feedback from the "debug" section:
Data Source "website" extracted from <meta property="og:type" />
Data Source "My Site Title" extracted from <meta property="og:title" />
Data Source "http://www.mysite.org/videos/index/16922653" extracted from <meta property="og:url" />
Data Source Extracted 1 values from <meta property="og:image" />: http://b.vimeocdn.com/ts/104/367/104367616_200.jpg
Data Source "My Site" extracted from <meta property="og:site_name" />
Looks like it understands the image url. It suggested some iframe code which I tried but still no dice, I don't get the image I specify.
Try running the URL Linter to see if you can find any errors on your pages.
hmm maybe (maaaaaaybe) it's because you dont have the og namespace on the html tag..
or.. maybe because the image's url is on a different domain than your page?
good luck