Issue #33 - Apprise notification line break #167
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding a line break for email notifications never worked for me. After some troubleshooting what I discovered was that when the settings form is submitted PHP will urlencode the parameters and when we access those parameters using _GET it does a urldecode, but for some reason certain characters aren't decoded properly. I don't know if it's a PHP bug or something else, but by base64 encoding the values when the form is submitted the setting values remain intact.
For email I've been using
<br/>
for a line break, but suspect others who are using/r/n
or/n
are having the same issue.While personally I only needed this for the notification body I did it for the title too in case that's helpful for somebody else.
This change works with the actual notification but not with the current test notification. Not included in this pull request, it's always bothered me that sending a test notification and sending an actual notification used two different sets of code. That's why, as mentioned in issue #33, the test notification with a line break would succeed but the actual notification would fail, and why this fix works with the actual notification but not with the current test notification. I'm looking at combining those two code bases in a separate pull request.
Edit: the change to use the same code base for both regular and test notifications is PR #174 .