• Resolved hommealone

    (@hommealone)


    The code being generated for our Twitter button is throwing html validation errors:

    Bad value https://twitter.com/intent/tweet?text=Great+website+about+the+Gunks https://www.mtnscenicbyway.org/maps/public-transportation for attribute href on element a: Illegal character in query: space is not allowed.

    No space between attributes.
    At line 1, column 152
    transportation’style=’display:

    Also these (probably less important):

    Error: Attribute nopin not allowed on element img at this point.

    From line 2, column 8; to line 2, column 202

    >↩ Tweet

    Attributes for element img:
    Global attributes
    alt — Replacement text for use when images are not available
    src — Address of the resource
    srcset — Images to use in different situations (e.g., high-resolution displays, small monitors, etc.)
    sizes — Image sizes for different page layouts
    crossorigin — How the element handles crossorigin requests
    usemap — Name of image map to use
    ismap — Whether the image is a server-side image map
    width — Horizontal dimension
    height — Vertical dimension
    referrerpolicy — Referrer policy for fetches initiated by the element
    decoding — Decoding hint to use when processing this image for presentation
    loading — Used when determining loading deferral

    Error: Bad value auto for attribute width on element img: Expected a digit but saw a instead.

    From line 2, column 8; to line 2, column 202

    >↩ Tweet

    So, in the plugin settings, under section 2 “what do you want the icons to do”, for the Twitter icon I have selected: Tweet about my page: with the value: Great website about the Gunks

    Here is the code which is being output by the plugin, and which I ran through the w3 HTML validator:

    
    <a target='_blank' href='https://twitter.com/intent/tweet?text=Great+website+about+the+Gunks https://www.mtnscenicbyway.org/maps/public-transportation'style='display:inline-block' >
    							<img nopin=nopin width='auto' class='sfsi_wicon' src='https://www.mtnscenicbyway.org/wp-content/plugins/ultimate-social-media-icons/images/visit_icons/en_US_Tweet.svg' alt='Tweet' title='Tweet' >
    						</a>
    

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor socialtech

    (@socialtech)

    Thanks for reporting this!

    We will include the fix in the next version of the plugin.

    Thread Starter hommealone

    (@hommealone)

    Thanks a lot!

    While you are at it, you might also want to consider increasing the margin between the buttons – maybe from 5px to 10 or 15px? – to avoid Google Search Console “Clickable items too close together” errors. Just a suggestion; I always need to override your margin setting for that reason.

    Plugin Contributor socialtech

    (@socialtech)

    The space between the icons is not fixed, it can be adjusted from under question number 6 in the plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Twitter button throwing validation error: no space character allowed in href att’ is closed to new replies.