Browse Source

Add newline after <textarea> because it is always removed by the browser per spec: https://www.w3.org/TR/html401/appendix/notes.html#notes-line-breaks

pdontthink 8 years ago
parent
commit
27b185fda1

+ 1 - 1
src/options_identities.php

@@ -230,7 +230,7 @@ function sti_textarea( $title, $name, $data, $bgcolor ) {
     $str = '';
     $str = '';
     $str .= '<tr' . $bgcolor . ">\n";
     $str .= '<tr' . $bgcolor . ">\n";
     $str .= '  <td style="white-space: nowrap;text-align:right;">' . $title . ' </td>' . "\n";
     $str .= '  <td style="white-space: nowrap;text-align:right;">' . $title . ' </td>' . "\n";
-    $str .= '  <td> <textarea name="' . $name . '" cols="50" rows="5">'. sm_encode_html_special_chars($data) . '</textarea> </td>' . "\n";
+    $str .= '  <td> <textarea name="' . $name . '" cols="50" rows="5">'. "\n" . sm_encode_html_special_chars($data) . '</textarea> </td>' . "\n";
     $str .= '</tr>';
     $str .= '</tr>';
 
 
     return $str;
     return $str;

+ 2 - 1
templates/default/compose_body.tpl

@@ -26,7 +26,8 @@ extract($t);
 <table cellspacing="0" class="table1">
 <table cellspacing="0" class="table1">
  <tr>
  <tr>
   <td style="text-align: center">
   <td style="text-align: center">
-   <textarea name="body" id="body" rows="<?php echo $editor_height; ?>" cols="<?php echo $editor_width; ?>" <?php if ($accesskey_compose_body != 'NONE') echo 'accesskey="' . $accesskey_compose_body . '" '; echo $input_onfocus; ?>><?php echo $body; ?></textarea>
+   <textarea name="body" id="body" rows="<?php echo $editor_height; ?>" cols="<?php echo $editor_width; ?>" <?php if ($accesskey_compose_body != 'NONE') echo 'accesskey="' . $accesskey_compose_body . '" '; echo $input_onfocus; ?>>
+<?php echo $body; ?></textarea>
   </td>
   </td>
  </tr>
  </tr>
  <?php
  <?php

+ 2 - 1
templates/default/options_advidentity_list.tpl

@@ -82,7 +82,8 @@ extract($t);
       <?php echo _("Signature"); ?>
       <?php echo _("Signature"); ?>
      </td>
      </td>
      <td class="fieldValue">
      <td class="fieldValue">
-      <textarea name="newidentities[<?php echo $index; ?>][signature]" cols="50" rows="5"><?php echo $identity['Signature']; ?></textarea>
+      <textarea name="newidentities[<?php echo $index; ?>][signature]" cols="50" rows="5">
+<?php echo $identity['Signature']; ?></textarea>
      </td>
      </td>
     </tr>
     </tr>
     <?php /* FIXME: No hooks in templates! */ $temp = array('', &$identity['New'], &$index); echo concat_hook_function('options_identities_table', $temp); ?>
     <?php /* FIXME: No hooks in templates! */ $temp = array('', &$identity['New'], &$index); echo concat_hook_function('options_identities_table', $temp); ?>

+ 1 - 1
templates/default/textarea.tpl

@@ -32,6 +32,6 @@ echo '<textarea name="' . $name . '" rows="' . $rows . '" cols="' . $cols . '"';
 foreach ($aAttribs as $key => $value) {
 foreach ($aAttribs as $key => $value) {
     echo ' ' . $key . (is_null($value) ? '' : '="' . $value . '"');
     echo ' ' . $key . (is_null($value) ? '' : '="' . $value . '"');
 }
 }
-echo '>' . $text . "</textarea>\n";
+echo ">\n" . $text . "</textarea>\n";
 
 
 
 

+ 2 - 1
templates/default_advanced/compose_body.tpl

@@ -26,7 +26,8 @@ extract($t);
 <table cellspacing="0" class="table1">
 <table cellspacing="0" class="table1">
  <tr>
  <tr>
   <td style="text-align: center">
   <td style="text-align: center">
-   <textarea name="body" id="body" rows="<?php echo $editor_height; ?>" cols="<?php echo $editor_width; ?>" <?php if ($accesskey_compose_body != 'NONE') echo 'accesskey="' . $accesskey_compose_body . '" '; echo $input_onfocus; ?>><?php echo $body; ?></textarea>
+   <textarea name="body" id="body" rows="<?php echo $editor_height; ?>" cols="<?php echo $editor_width; ?>" <?php if ($accesskey_compose_body != 'NONE') echo 'accesskey="' . $accesskey_compose_body . '" '; echo $input_onfocus; ?>>
+<?php echo $body; ?></textarea>
 
 
 <?php if (checkForJavascript()) // Display text area resizing handle
 <?php if (checkForJavascript()) // Display text area resizing handle