Skip to content

Commit

Permalink
fix: bug fix (openemr#7230)
Browse files Browse the repository at this point in the history
* fix: bug fix

* js context
  • Loading branch information
stephenwaite authored Feb 14, 2024
1 parent 846301a commit 47596c6
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion contrib/forms/xmlformgen/xslt/new.php.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ $submiturl = $GLOBALS['rootdir'].'/forms/'.$form_folder.'/save.php?mode=new&
<script>
// this line is to assist the calendar text boxes
var mypcc = '<?php echo $GLOBALS['phone_country_code']; ?>';
var mypcc = <?php echo js_escape($GLOBALS['phone_country_code']); ?>;
<!-- a validator for all the fields expected in this form -->
function validate() {
Expand Down
2 changes: 1 addition & 1 deletion contrib/forms/xmlformgen/xslt/view.php.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ else
<script>
// this line is to assist the calendar text boxes
var mypcc = '<?php echo $GLOBALS['phone_country_code']; ?>';
var mypcc = <?php echo js_escape($GLOBALS['phone_country_code']); ?>;
<!-- FIXME: this needs to detect access method, and construct a URL appropriately! -->
function PrintForm() {
Expand Down
2 changes: 1 addition & 1 deletion interface/main/calendar/add_edit_event.php
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ function setEventDate($start_date, $recurrence)
<script>
<?php require $GLOBALS['srcdir'] . "/formatting_DateToYYYYMMDD_js.js.php" ?>

var mypcc = '<?php echo $GLOBALS['phone_country_code'] ?>';
var mypcc = <?php echo js_escape($GLOBALS['phone_country_code']); ?>;

var durations = new Array();
<?php
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ $(function () {
}
?>
<li class='ui-state-default sortable_li <?php echo $this->escapeHtml($rowforms[1]);?>' id='<?php echo preg_replace('/\s/','_',$this->escapeHtml($rowforms[0]));?>'>
<?php echo $rowforms[0];
<?php echo text($rowforms[0]);
if(is_array($rowforms[2] ?? null)){
?>
<ul class='droptrue' style='display: none;' id='sub_<?php echo preg_replace('/\s/','_',$this->escapeHtml($rowforms[0]));?>'>
Expand Down
2 changes: 1 addition & 1 deletion interface/orders/single_order_results.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ function generate_order_report($orderid, $input_form = false, $genstyles = true,

<?php if (empty($GLOBALS['PATIENT_REPORT_ACTIVE'])) { ?>
<script>
var mypcc = '<?php echo $GLOBALS['phone_country_code'] ?>';
var mypcc = <?php echo js_escape($GLOBALS['phone_country_code']); ?>;
if (typeof top.webroot_url === "undefined") {
if (typeof opener.top.webroot_url !== "undefined") {
top.webroot_url = opener.top.webroot_url;
Expand Down
2 changes: 1 addition & 1 deletion interface/reports/patient_flow_board_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ function setpatient(pid, lname, fname, dob) {
<tr bgcolor='<?php echo attr($bgcolor ?? ''); ?>'>
<?php
if (!$chk_show_drug_screens && !$chk_show_completed_drug_screens) { # the first part of this block is for the Patient Flow Board report ?>
<td class="detail">&nbsp;<?php echo ($docname == $lastdocname) ? "" : $docname ?>
<td class="detail">&nbsp;<?php echo text(($docname == $lastdocname) ? "" : $docname) ?>
</td>

<td class="detail"><?php echo text(oeFormatShortDate($appointment['pc_eventDate'])) ?>
Expand Down
2 changes: 1 addition & 1 deletion portal/report/portal_custom_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ function next_prev(action){
<h2><?php echo text($facility['name']); ?></h2>
<?php echo text($facility['street']); ?><br />
<?php echo text($facility['city']); ?>, <?php echo text($facility['state']); ?> <?php echo text($facility['postal_code']); ?><br clear='all'>
<?php echo $facility['phone'] ?><br />
<?php echo text($facility['phone']) ?><br />

<a href="javascript:window.close();"><span class='title'><?php echo text($titleres['fname']) . " " . text($titleres['lname']); ?></span></a><br />
<span class='text'><?php echo xlt('Generated on'); ?>: <?php echo text(oeFormatShortDate()); ?></span>
Expand Down
4 changes: 3 additions & 1 deletion portal/report/portal_patient_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ function show_date_fun(){
}
return;
}
var mypcc = '<?php echo $GLOBALS['phone_country_code']; ?>';

var mypcc = <?php echo js_escape($GLOBALS['phone_country_code']); ?>;

</script>

<body class="body_top">
Expand Down

0 comments on commit 47596c6

Please sign in to comment.