I'm using social sharing for the projects content,
So what's happening over the navigation is actually the meta tags (facebook and twitter) for description
This is twitter:
<meta name="twitter:description" content="<p><a href="https://www.facebook.com/hashtag/historyinaction?source=feed_text&story_id=979005138787815"><span>#HistoryInAction</span></a> This <a href="https://www.facebook.com/hashtag/ivlp?source=feed_text&story_id=979005138787815"><span>#IVLP</span></a> Danish Civil Rights leader met with Rev. Robert Graetz and his wife Jeannie in Alabama to learn about the role of the religious community in fighting for justice and c</p>">
So in some kind of way the 'a' (link) is ruining the meta tags,
I would appreciate it very much if someone could help me out with this,
It is the quote marks for the href attribute that are messing up your content. You'll have to escape the nested quote marks (e.g., with ") or use apostrophes instead.
Problem with the Rich text editor!
Hi guys
I don't know if any of you have experience the same problem,
bascially, when I paste a text in the RTE and press publish after - and then return to my website,
I see a duplicated text above my navigation. It seems like when I place a link in there (RTE) this problem occur.
Can someone please help me with this, it's really frustrating.
/Sharmarke
I found some hints to my problems
I'm using social sharing for the projects content,
So what's happening over the navigation is actually the meta tags (facebook and twitter) for description
This is twitter:
So in some kind of way the 'a' (link) is ruining the meta tags,
I would appreciate it very much if someone could help me out with this,
//Sharmarke
It is the quote marks for the
href
attribute that are messing up your content. You'll have to escape the nested quote marks (e.g., with"
) or use apostrophes instead.Can you provide with an example?
In short, this is what you are currently outputting:
And this is what you should output:
If there are ampersands and such, you should encode those too.
Razor should handle this for you (unless you use something like
Html.Raw
, which prevents escaping HTML).Thank you for your help
I found another method to solve my problem
What method was that?
I changed this:
To this:
I took out the quote marks on content and replaced it with apostrophes like you said.
is working on a reply...