DiogoRedinDevelopment
DiogoRedinDevelopment Recent Posts Threads Started
567 posts
  • Located in Portugal
  • Contributed a blog post
  • Helped several times protecting Envato Market against copyright violations
  • Has sold $5,000+ on Envato Market
+4 more
DiogoRedinDevelopment says

Hi Everyone!

I’m validating the code of our theme, however I’ve a problem: The social share links don’t validate.

Here is the input code:

echo '<a href="http://twitter.com/home?status=';

   print(urlencode(the_title()));
   echo '+';
   print(urlencode(the_permalink()));

echo '">Share</a>';

and the output:

<a href="http://twitter.com/home?status=San Francisco police launch probe into iPhone case+http://beta.landpost.themesfever.com/san-francisco-police-launch-probe-into-iphone-case">Share</a>

Error given by the w3c validator:

Bad value … for attribute href on element a: Whitespace in query component. Use %20 in place of spaces.

How can I solve this?

DiogoRedinDevelopment
DiogoRedinDevelopment Recent Posts Threads Started
567 posts
  • Located in Portugal
  • Contributed a blog post
  • Helped several times protecting Envato Market against copyright violations
  • Has sold $5,000+ on Envato Market
+4 more
DiogoRedinDevelopment says

Problem solved :P

by
by
by
by
by
by