[Fusionforge-commits] FusionForge branch master updated. ce065d618c3d77494691b239ff54570cd22e2c0e

Franck Villaume nerville at fusionforge.org
Thu Sep 11 13:33:58 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  ce065d618c3d77494691b239ff54570cd22e2c0e (commit)
      from  06599131bf6253c4af5b03c88f3ef2325c6b5e77 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ce065d618c3d77494691b239ff54570cd22e2c0e
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Thu Sep 11 13:32:07 2014 +0200

    viewvc force Content-Type for any text/* or */javascript

diff --git a/src/www/scm/viewvc.php b/src/www/scm/viewvc.php
index af1dfef..c0d58d9 100644
--- a/src/www/scm/viewvc.php
+++ b/src/www/scm/viewvc.php
@@ -160,9 +160,10 @@ switch ($_GET['view']) {
 		$sysdebug_enable = false;
 		if (isset($content_type)) {
 			switch ($content_type) {
-				case 'text/html':
-				case 'application/javascript': {
-					echo htmlentities($body);
+				case (preg_match('/text\/.*/', $content_type) ? true : false):
+				case (preg_match('/.*\/javascript/', $content_type) ? true : false): {
+					header('Content-Type: text/plain');
+					echo $body;
 					break;
 				}
 				default: {

-----------------------------------------------------------------------

Summary of changes:
 src/www/scm/viewvc.php |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list