[AppDB] Handle newlines and quotes in common replies
Rosanne DiMesio
dimesio at earthlink.net
Wed Jul 26 13:18:31 CDT 2017
Fixes bug 28687.
Signed-off-by: Rosanne DiMesio <dimesio at earthlink.net>
---
css/styles.css | 4 ++++
include/objectManager.php | 9 +++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/css/styles.css b/css/styles.css
index eaf2822..0ff3e35 100644
--- a/css/styles.css
+++ b/css/styles.css
@@ -357,6 +357,10 @@ A:hover { color: #FF6666; text-decoration: underline; }
A:active { color: #FF0000; }
A.hidden { text-decoration: none; color: #000000; }
+/* Format a span to look like a hyperlink */
+.pseudolink { color: #A50D0D; cursor: pointer; }
+.pseudolink:hover { text-decoration: underline; }
+
/* Padding and Margin Removal */
.nomargin { margin: 0px !important; }
.nomargin-top { margin-top: 0px !important; }
diff --git a/include/objectManager.php b/include/objectManager.php
index 331992b..36df560 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -425,7 +425,7 @@ class ObjectManager
if($this->getIsQueue())
{
/////////////////////////////////////////////////
- // output radio buttons for some common responses
+ // output some common responses
$oTag = new TagCommonReply(null, null, "_show_for_{$this->sClass}");
$aReplies = $oTag->getTaggedEntries();
@@ -444,10 +444,11 @@ class ObjectManager
{
$sReply = $oReply->getReply();
echo '<tr valign=top><td class="color0"></td>',"\n";
- echo '<td class="color0"><a onClick="document.forms[\'sQform\'][\'sReplyText\'].value += \''.$sReply.' \';">'.$sReply.'</a></td>',"\n";
- echo '</tr>',"\n";
+ echo '<td class="color0">';
+ echo '<span class="pseudolink" onClick="document.forms[\'sQform\'][\'sReplyText\'].value += \''.addcslashes(htmlspecialchars($sReply),"'\r\n").' \';">'.nl2br($sReply).'</span>';
+ echo '</td>',"\n";
}
- // end output radio buttons for common responses
+ // end output for common responses
/////////////////////////////////////////////////
}
--
2.12.3
More information about the wine-patches
mailing list