sub enEntity { my $string = shift; if ($string =~ /&/) { #print "string: $string\n"; } if ($string =~ /&(amp;)+quot;/) { $string =~ s/&(amp;)+quot;/"/ig; } if ($string =~ /"/) { $string =~ s/"/"/ig; } if ($string =~ /"/) { $string =~ s/"/"/ig; } if ($string =~ /&(amp;)+apos;/) { $string =~ s/&(amp;)+apos;/'/ig; } if ($string =~ /'/) { $string =~ s/'/'/ig; } if ($string =~ /'/) { $string =~ s/'/'/ig; } if ($string =~ /&(amp;)+/) { $string =~ s/&(amp;)+/&/ig; } if ($string =~ /&/) { $string =~ s/&/&/ig; } if ($string =~ /&/) { $string =~ s/&/&/ig; } #optional #$string = unidecode($string); return ($string); } # end sub unescape html entities
Friday, September 19, 2014
Perl subroutine to fix when html entities get recursively applied
Subscribe to:
Post Comments (Atom)
But seriously, native HTML is repetitive and annoying to write. Emmet provides an intuitive and sleek alternative. psd to html
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteA PSD file, as we all are aware of, is a photo shop design file which gives us the liberty to creatively design the look and appeal of our websites.
ReplyDeleteStartPoint Web Design
Caesars Palace in Las Vegas - JMT Hub
ReplyDeleteHarrah's Cherokee 울산광역 출장안마 Casino 강릉 출장마사지 & Hotel. Harrah's 의정부 출장마사지 Cherokee Casino 원주 출장마사지 Resort is operated by Caesars Entertainment. This casino hotel is 광명 출장마사지 located in