HTML Validation Errors for Social Media Share links (Warning: unescaped & or unknown

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lainenickl
    New Member
    • Mar 2015
    • 1

    HTML Validation Errors for Social Media Share links (Warning: unescaped & or unknown

    I created a template that has Facebook, Twitter and LinkedIn share butotns (which share an event page). It works correctly however when I test it, however, when I do the HTML validation I get the following errors:

    line 582 column 171 - Warning: unescaped & or unknown entity "&url"
    line 585 column 62 - Warning: unescaped & or unknown entity "&url"
    line 582 column 7 - Warning: <a> escaping malformed URI reference.

    Here's the code being referenced:

    582
    <a href="http://twitter.com/share?text=Outr each%20Marketin g%20Virtual%20S ummit%20is%20ba ck!%20Join%20us %20April%2028%2 0for%20this%20f ree,%20all-day,%20online event!&url=http ://www.grouphigh.c om/outreach-marketing-summit"

    585
    <a href="http://twitter.com/share?text=Outr each%20Marketin g%20Virtual%20S ummit%20is%20ba ck!%20Join%20us %20April%2028%2 0for%20this%20f ree,%20all-day,%20online event!&url=http ://www.grouphigh.c om/outreach-marketing-summit"

    Any idea how to get this HTML validated? The validation is through Marketo.
  • TennzyAlyn
    New Member
    • Aug 2023
    • 1

    #2
    Hm, sounds complicated. Have you solved it?

    Comment

    • AdmontYanko
      New Member
      • Jun 2023
      • 4

      #3
      It looks like the '&' in the URL might be causing the trouble. Try replacing it with '%26'. Also, for '&' in the text, use '&.' This helps with proper HTML escaping.

      Comment

      Working...