PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.15.3
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.15.3
3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 All 138 releases
← All changes | views/preview-page.php +27 -16 2.10.22.15.3 View file →
@@ -1,4 +1,10 @@
1 +<?php
2 +if (!defined('ABSPATH') && !defined('BITFORMS_ASSET_URI')) {
3 + exit;
4 +}
5 +?>
6 +
1 7 <!DOCTYPE html>
2 8 <html lang="en">
3 9
4 10 <head>
@@ -4,9 +10,9 @@
4 10 <head>
5 11 <meta charset="UTF-8">
6 12 <meta http-equiv="X-UA-Compatible" content="IE=edge">
7 13 <meta name="viewport" content="width=device-width, initial-scale=1.0">
8 - <title><?php echo isset($title) ? $title : ''; ?></title>
14 + <title><?php echo isset($title) ? esc_html($title) : ''; ?></title>
9 15 <style>
10 16 html,
11 17 body {
12 18 min-height: 100%;
@@ -19,30 +25,31 @@
19 25 flex-direction: column;
20 26 /* background-color: #f1f1f1; */
21 27 }
22 28
23 - ._frm-bg-b<?php echo $formID;
29 + ._frm-bg-b<?php echo esc_html($formID);
24 30
25 - ?> {
26 - width: 600px;
31 +?> {
32 + width: 960px;
27 33 margin-block: 100px;
28 34 }
29 35 </style>
30 36 <?php
31 - $formUpdateVersion = get_option('bit-form_form_update_version');
32 - ?>
33 - <link rel="stylesheet" href="<?=BITFORMS_UPLOAD_BASE_URL?>/form-styles/bitform-<?=$formID?>.css?bfv=<?=$formUpdateVersion?>" />
37 + $formUpdateVersion = get_option('bit-form_form_update_version');
38 +$cssUrl = BITFORMS_UPLOAD_BASE_URL . '/form-styles/bitform-' . $formID . '.css?bfv=' . $formUpdateVersion;
39 +?>
40 + <link rel="stylesheet" href="<?php echo esc_url($cssUrl) ?>" />
34 41 <?php
35 - $customCssSubPath = '/form-styles/bitform-custom-' . $formID . '.css';
36 - ?>
42 +$customCssSubPath = '/form-styles/bitform-custom-' . $formID . '.css';
43 +?>
37 44 <?php if(file_exists(BITFORMS_CONTENT_DIR . $customCssSubPath)) : ?>
38 - <link rel="stylesheet" href="<?php echo BITFORMS_UPLOAD_BASE_URL . $customCssSubPath ?>" />
45 + <link rel="stylesheet" href="<?php echo esc_url(BITFORMS_UPLOAD_BASE_URL . $customCssSubPath) ?>" />
39 46 <?php endif; ?>
40 47
41 48 <?php if (isset($font) && '' !== $font): ?>
42 49 <link rel="preconnect" href="https://fonts.googleapis.com">
43 50 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
44 - <link rel="stylesheet" href="<?php echo $font?>" />
51 + <link rel="stylesheet" href="<?php echo esc_url($font) ?>" />
45 52 <?php endif; ?>
46 53
47 54 </head>
48 55
@@ -49,15 +56,19 @@
49 56 <body>
50 57 <?php echo $formHTML?>
51 58
52 59 <script>
53 - <?php echo $bfGlobals?>;
60 + <?php
61 +echo $bfGlobals;
62 +$previewJsUrl = BITFORMS_UPLOAD_BASE_URL . '/form-scripts/preview-' . $formID . '.js?bfv=' . $formUpdateVersion;
63 +?>;
54 64 </script>
55 - <script src="<?=BITFORMS_UPLOAD_BASE_URL?>/form-scripts/preview-<?=$formID?>.js?bfv=<?=$formUpdateVersion?>"></script>
65 + <script src="<?php echo esc_url($previewJsUrl) ?>">
66 + </script>
56 67
57 68
58 69 <div style="position:fixed;top:0;left:0;border:1px solid lightgray;background:#fafafa;padding:10px">
59 -<?php
70 + <?php
60 71 function readable_filesize($bytes, $decimals = 2)
61 72 {
62 73 $sz = 'BKMGTP';
63 74 $factor = floor((strlen($bytes) - 1) / 3);
@@ -62,10 +73,10 @@
62 73 $sz = 'BKMGTP';
63 74 $factor = floor((strlen($bytes) - 1) / 3);
64 75 return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . ' ' . @$sz[$factor];
65 76 }
66 - ?>
67 - <div>Form ID : <?php echo isset($formID) ? $formID : ''; ?></div>
77 +?>
78 + <div>Form ID : <?php echo isset($formID) ? esc_html($formID) : ''; ?></div>
68 79 <div>JS size =
69 80 <?php echo readable_filesize(filesize(BITFORMS_CONTENT_DIR . '/form-scripts/preview-' . $formID . '.js')); ?>
70 81 </div>
71 82 <div>CSS size =