Browse Source

Fix issue where domain is not displayed in html

Jaap Marcus 4 years ago
parent
commit
283246241a

+ 1 - 1
web/templates/pages/add_dns_rec.html

@@ -149,5 +149,5 @@
 </div>
 
 <script>
-	GLOBAL.DNS_REC_PREFIX = <?php json_encode($_GET['domain']) ?>;
+	GLOBAL.DNS_REC_PREFIX = "<?=htmlentities($_GET['domain']); ?>";
 </script>

+ 2 - 2
web/templates/pages/add_web.html

@@ -549,6 +549,6 @@
 	  </div>
 
 	<script>
-		GLOBAL.FTP_USER_PREFIX = <?php json_encode($user.'_') ?>;
-		GLOBAL.FTP_USER_PREPATH = <?= json_encode($v_ftp_user_prepath) ?>;
+		GLOBAL.FTP_USER_PREFIX = "<?=htmlentities($user.'_');?>";
+		GLOBAL.FTP_USER_PREPATH = "<?=htmlentities($v_ftp_user_prepath);?>";
 	</script>

+ 1 - 1
web/templates/pages/edit_dns_rec.html

@@ -154,5 +154,5 @@
 	</form>
 </div>
 <script>
-	GLOBAL.DNS_REC_PREFIX = <?php json_encode($_GET['domain']) ?>;
+	GLOBAL.DNS_REC_PREFIX = "<?=htmlentities($_GET['domain']); ?>";
 </script>