Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\Laminas\Mime\Decode::decodeQuotedPrintable() doesn't seem to do what its name suggests #37

Closed
fredden opened this issue Dec 5, 2023 · 1 comment
Labels
Bug Something isn't working

Comments

@fredden
Copy link

fredden commented Dec 5, 2023

Bug Report

Q A
Version(s) 2.12.0

Summary

I can successfully encode a string using \Laminas\Mime\Mime::encodeQuotedPrintable(), however when I use \Laminas\Mime\Decode::decodeQuotedPrintable(), I don't seem to get the expected result.

Current behavior

Passing =0A into \Laminas\Mime\Decode::decodeQuotedPrintable() does not result in a newline character, but instead gives back the same input string.

How to reproduce

<?php

require_once __DIR__ . '/vendor/autoload.php';

$text = "This string spans\ntwo lines.";
$encoded = \Laminas\Mime\Mime::encodeQuotedPrintable($text);
$decoded = \Laminas\Mime\Decode::decodeQuotedPrintable($encoded);

var_dump($text, $encoded, $decoded, $text === $decoded);
string(28) "This string spans
two lines."
string(30) "This string spans=0Atwo lines."
string(30) "This string spans=0Atwo lines."
bool(false)

Expected behavior

string(28) "This string spans
two lines."
string(30) "This string spans=0Atwo lines."
string(28) "This string spans
two lines."
bool(true)
@fredden fredden added the Bug Something isn't working label Dec 5, 2023
@laminas-bot
Copy link
Contributor

This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering Committee.
If you have a security issue, please follow our security reporting guidelines.
If you wish to take on the role of maintainer, please nominate yourself

If you are looking for an actively maintained package alternative, we recommend:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants