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

Fix the check for a 'text/plain' Content-Type header. #10

Merged
merged 1 commit into from
Mar 6, 2015
Merged

Fix the check for a 'text/plain' Content-Type header. #10

merged 1 commit into from
Mar 6, 2015

Conversation

bradyvercher
Copy link
Contributor

Jetpack, and other plugins, send the charset in the Content-Type header,
causing the text/plain check to fail, so the message body doesn't get converted
to HTML.

Instead, just make sure the Content-Type header contains 'text/plain' at the
beginning of the string.

See #8

@danielbachhuber
Copy link
Owner

Shouldn't we check anywhere in the string, as order doesn't matter when you have multiple headers?

@bradyvercher
Copy link
Contributor Author

The plugin only accounts for one Content-Type header, but I don't see what it could hurt to check to see if it exists anywhere in that header.

Jetpack, and other plugins, send the charset in the Content-Type  header,
causing the text/plain check to fail, so the message body doesn't get converted
to HTML.

Instead, just make sure the Content-Type header contains 'text/plain' anywhere
in the string. See #8
@bradyvercher
Copy link
Contributor Author

How's that?

@danielbachhuber danielbachhuber added this to the 0.1 milestone Mar 6, 2015
@danielbachhuber
Copy link
Owner

Perfect

danielbachhuber added a commit that referenced this pull request Mar 6, 2015
Fix the check for a 'text/plain' Content-Type header.
@danielbachhuber danielbachhuber merged commit fe62198 into danielbachhuber:master Mar 6, 2015
@bradyvercher bradyvercher deleted the fix-plaintext branch March 6, 2015 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants