Web client encoding problem with Alerts from Android

Bug #986481 reported by Tim Bentley
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenLP
Invalid
Undecided
Unassigned
Android
Fix Released
Medium
Tim Bentley

Bug Description

Android client sends an alert encoded

OpenLP displays the alert with spaces converted to "+".

http://192.168.0.7:4316/api/alert?data=%7B%22request%22%3A%7B%22text%22%3A%22hello%2Bmum%22%7D%7D

Tim Bentley (trb143)
Changed in openlp:
status: New → Invalid
Revision history for this message
Ashley Hood (sendtoashley) wrote :

Hi Tim,

You have probably already fixed this, but the bug is caused by the URL being encoded twice.
In "/src/org/openlp/android/activity/Alert.java" not encoding the text from the edittext box will solve it.

Change:
alert = JSONHandler.createRequestJSON("text", URLEncoder.encode(edittext.getText().toString(), "utf-8"));

to:
alert = JSONHandler.createRequestJSON("text", edittext.getText().toString());

I haven't had time to test this so can't be 100% sure it will work.

Hope this helps,

Ashley

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.