Commit 6409b75f authored by Lisa Seeto's avatar Lisa Seeto Committed by Robert Lyon
Browse files

Bug 1874140: Collection exported in PDF has page links that are not helpful



- add in regex to remove div breadcrumbs from filedata

Change-Id: I8bd9972705d338f71576c08adb8ec484a1985edd
Signed-off-by: default avatarLisa Seeto <lisaseeto@catalyst.net.nz>
(cherry picked from commit 532ad0e9)
parent 71697194
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -210,6 +210,7 @@ class PluginExportPdf extends PluginExportHtml {
                // Adjust the relative links to files to be textual to mention where the file lives within the zip file
                // Because we can't make relative links in a pdf export
                $filedata = file_get_contents($filename);
                $filedata = preg_replace('/<div class="breadcrumbs collection">.*?<\/div>/s', '', $filedata);
                if ($view->get('newlayout')) {
                    if (preg_match('/var blocks = (\[.*?\]);/', $filedata, $matches)) {
                        $content = json_decode($matches[1]);