From f123d92b018b4f1aaa6ea58d2c044b0b219b9486 Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Wed, 23 Apr 2014 21:57:59 +0000
Subject: [PATCH] Add export routine to TextareaField

Sanitize textarea content on export
---
 include/class.forms.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/class.forms.php b/include/class.forms.php
index 00a885f3a..257f4ab9a 100644
--- a/include/class.forms.php
+++ b/include/class.forms.php
@@ -601,6 +601,11 @@ class TextareaField extends FormField {
         else
             return Format::htmlchars($value);
     }
+
+    function export($value) {
+        return (!$value) ? $value : Format::html2text($value);
+    }
+
 }
 
 class PhoneField extends FormField {
-- 
GitLab