Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Method for LiteralData normalization

  • Loading branch information...
commit 10ea11df4f44106d7f9e90fa20739d4795bfdc88 1 parent a3bf2db
Stephen Paul Weber singpolyma authored committed

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. +6 0 lib/openpgp.php
6 lib/openpgp.php
@@ -981,6 +981,12 @@ function __construct($data=NULL, $opt=array()) {
981 981 $this->timestamp = $opt['timestamp'] ? $opt['timestamp'] : time();
982 982 }
983 983
  984 + function normalize() {
  985 + if($opt['format'] == 'u' || $opt['format'] == 't') { // Normalize line endings
  986 + $this->data = str_replace("\n", "\r\n", str_replace("\r", "\n", str_replace("\r\n", "\n", $this->data)));
  987 + }
  988 + }
  989 +
984 990 function read() {
985 991 $this->size = $this->length - 1 - 4;
986 992 $this->format = $this->read_byte();

0 comments on commit 10ea11d

Please sign in to comment.
Something went wrong with that request. Please try again.