• Resolved atao

    (@atao)


    Hello

    In file social-linkz/social-linkz.php, there are some ampersands that should be defined as html entities, e.g.:

    – for linkedin, ligne 765, 3 times:
    <a rel="nofollow" target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=<?php echo urlencode($long_url) ; ?>&title=<?php echo str_replace('+','%20',urlencode("[Blog] ".$titre)) ; ?>&source=<?php echo urlencode(get_bloginfo('name')) ; ?>" title="<?php echo sprintf(__("Share -%s- on %s", $this->pluginID), htmlentities($titre, ENT_QUOTES, 'UTF-8'), "LinkedIn") ; ?>">

    – for viadeo, ligne 788, 3 times:

    <a rel="nofollow" target="_blank" href="https://www.viadeo.com/shareit/share/?url=<?php echo urlencode($long_url) ; ?>&title=<?php echo str_replace('+','%20',urlencode("[Blog] ".$titre)) ; ?>&overview=<?php echo str_replace('+','%20',urlencode("[Blog] ".$titre)) ; ?>" title="<?php echo sprintf(__("Share -%s- on %s", $this->pluginID), htmlentities($titre, ENT_QUOTES, 'UTF-8'), "Viadeo") ; ?>">

    – …

    Regards

    https://www.ads-software.com/plugins/social-linkz/

Viewing 5 replies - 1 through 5 (of 5 total)
  • why do you believe that this & should en transform into html entities ?
    The & are inside a url and I do not see any issue with that

    Thread Starter atao

    (@atao)

    The “&” will be used as it in the generated document, i.e. we’ll get things such as “&title”, “&overview”…

    When I check the generated page with https://validator.w3.org, I get this kind of messages:

    Error Line 130, Column 1795: & did not start a character reference. (& probably should have been escaped as &.)
    
    …-sortir-de-la-logique-de-supermarch%2F&title=%5BBlog%5D%20Recherche%20d%E2%80%…

    But “&title;”, or here “&title”, is not a valid entity. An ampersand is allowed by specification only as start of an entity. If there is any other ampersand, the document can’t be validated.

    Ok I understand … but the hard thing is that I believe that some browser will be lost if I write & amp; instead of &
    I have to check it

    Thread Starter atao

    (@atao)

    In social-linkz/social-linkz.php, there are already some “&” used in same context

    Will be corrected in the next version

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘ampersand should be html entities’ is closed to new replies.