{"id":546,"date":"2010-03-20T15:24:03","date_gmt":"2010-03-20T14:24:03","guid":{"rendered":"http:\/\/www.dotmana.com\/index.php\/?p=546"},"modified":"2010-03-20T15:24:03","modified_gmt":"2010-03-20T14:24:03","slug":"tcpdf-html-content-and-href-link-empty","status":"publish","type":"post","link":"https:\/\/www.dotmana.com\/weblog\/2010\/03\/tcpdf-html-content-and-href-link-empty\/","title":{"rendered":"TCPDF : html content and href link empty"},"content":{"rendered":"<p>If you get an issue with TCPDF and link inside html content, here is a little patch (apply it in tcpdf.php file) :<\/p>\n<blockquote><p>\/\/ get attributes<br \/>\n<strong>\/\/ patch<br \/>\nif ($dom[$key][&#8216;value&#8217;]==&#8217;a&#8217;)<br \/>\n{<br \/>\n$element = str_replace(&#8216;\\\\\\&#8221;&#8216;, &#8216;&#8221;&#8216;, $element);<br \/>\n}<\/strong><br \/>\n<strong>\/\/ en patch<\/strong><br \/>\npreg_match_all(&#8216;\/([^=\\s]*)=[&#8220;]?([^&#8221;]*)[&#8220;]?\/&#8217;, $element, $attr_array, PREG_PATTERN_ORDER);<br \/>\n$dom[$key][&#8216;attribute&#8217;] = array(); \/\/ reset attribute array<br \/>\nwhile (list($id, $name) = each($attr_array[1])) {<br \/>\n$dom[$key][&#8216;attribute&#8217;][strtolower($name)] = $attr_array[2][$id];<br \/>\n}<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>If you get an issue with TCPDF and link inside html content, here is a little patch (apply it in tcpdf.php file) : \/\/ get attributes \/\/ patch if ($dom[$key][&#8216;value&#8217;]==&#8217;a&#8217;) { $element = str_replace(&#8216;\\\\\\&#8221;&#8216;, &#8216;&#8221;&#8216;, $element); } \/\/ en patch &hellip; <a href=\"https:\/\/www.dotmana.com\/weblog\/2010\/03\/tcpdf-html-content-and-href-link-empty\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-546","post","type-post","status-publish","format-standard","hentry","category-dev"],"_links":{"self":[{"href":"https:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/posts\/546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/comments?post=546"}],"version-history":[{"count":1,"href":"https:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/posts\/546\/revisions"}],"predecessor-version":[{"id":547,"href":"https:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/posts\/546\/revisions\/547"}],"wp:attachment":[{"href":"https:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/media?parent=546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/categories?post=546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/tags?post=546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}