Skip to content

Commit

Permalink
Do not strip forms in the ModuleArticle::generatePdf() method (see #1…
Browse files Browse the repository at this point in the history
…123)

Description
-----------

Closes #618 

Complementary commit: contao/tcpdf-bundle@0c377c3

Commits
-------

10c2d6d1 Do not strip forms in the ModuleArticle::generatePdf() method (see #618)
  • Loading branch information
leofeyer committed Dec 20, 2019
1 parent 3df57e0 commit 11969bc
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/Resources/contao/modules/ModuleArticle.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,6 @@ public function generatePdf()
$strArticle = html_entity_decode($strArticle, ENT_QUOTES, Config::get('characterSet'));
$strArticle = $this->convertRelativeUrls($strArticle, '', true);

// Remove form elements and JavaScript links
$arrSearch = array
(
'@<form.*</form>@Us',
'@<a [^>]*href="[^"]*javascript:[^>]+>.*</a>@Us'
);

$strArticle = preg_replace($arrSearch, '', $strArticle);

if (empty($GLOBALS['TL_HOOKS']['printArticleAsPdf']))
{
throw new \Exception('No PDF extension found. Did you forget to install contao/tcpdf-bundle?');
Expand Down

0 comments on commit 11969bc

Please sign in to comment.