Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Twitter::API::Trait::DUsereContributediPerr::API::Trait::DecodeHtmlEntities(3)

NAME
       Twitter::API::Trait::DecodeHtmlEntities - Decode	HTML entities in
       strings

VERSION
       version 1.0005

SYNOPSIS
	   use Twitter::API;
	   use open qw/:std :utf8/;

	   my $client =	Twitter::API->new_with_traits(
	       traits => [ qw/ApiMethods DecodeHtmlEntites/ ],
	       %other_options
	   );

	   my $status =	$client->show_status(801814387723935744);
	   say $status->{text};

	   # output:
	   # Test DecodeHtmlEntities trait. < &	> XX X 'single'	"double"
	   #
	   # output without the	DecodeHtmlEntities trait:
	   # Test DecodeHtmlEntities trait. &lt; &amp; &gt; XX X 'single' "double"

DESCRIPTION
       Twitter has trust issues. They assume you're going to push the text you
       receive in API responses	to a web page without HTML encoding it.	But
       you HTML	encode all of your output right? And Twitter's lack of trust
       has you double encoding entities.

       So, include this	trait and Twitter::API will decode HTML	entities in
       all of the text returned	by the API.

       You're welcome.

AUTHOR
       Marc Mims <marc@questright.com>

COPYRIGHT AND LICENSE
       This software is	copyright (c) 2015-2018	by Marc	Mims.

       This is free software; you can redistribute it and/or modify it under
       the same	terms as the Perl 5 programming	language system	itself.

perl v5.32.1			  20Twitter::API::Trait::DecodeHtmlEntities(3)

NAME | VERSION | SYNOPSIS | DESCRIPTION | AUTHOR | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Twitter::API::Trait::DecodeHtmlEntities&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help