From f2aa215cced1d86c166404851520ed6c1f1cf05a Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Mon, 4 May 2009 02:37:53 +0000 Subject: [PATCH] BUGFIX Ensure that template path comments don't make it into ViewArchivedEmail git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@75919 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/CMSMain.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/CMSMain.php b/code/CMSMain.php index b5d4828c..2f0727de 100644 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -796,8 +796,11 @@ JS; // encode the message to appear in the body of the email $archiveURL = Director::absoluteBaseURL() . $record->URLSegment . '?archiveDate=' . $record->obj('LastEdited')->URLDatetime(); + + // Ensure that source file comments are disabled + SSViewer::set_source_file_comments(false); + $archiveEmailMessage = urlencode( $this->customise( array( 'ArchiveDate' => $record->obj('LastEdited'), 'ArchiveURL' => $archiveURL ) )->renderWith( 'ViewArchivedEmail' ) ); - $archiveEmailMessage = preg_replace( '/\+/', '%20', $archiveEmailMessage ); $fields->push( new HiddenField( 'ArchiveEmailMessage', '', $archiveEmailMessage ) );