mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-28 02:52:28 +00:00
Merge pull request #1658 from VOREStation/improper
Fix the letter ÿ in nano-ui displays
This commit is contained in:
@@ -324,4 +324,11 @@ proc/TextPreview(var/string,var/len=40)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/**
|
||||
* Strip out the special beyond characters for \proper and \improper
|
||||
* from text that will be sent to the browser.
|
||||
*/
|
||||
/proc/strip_improper(var/text)
|
||||
return replacetext(replacetext(text, "\proper", ""), "\improper", "")
|
||||
|
||||
#define gender2text(gender) capitalize(gender)
|
||||
@@ -345,10 +345,11 @@ nanoui is used to open and update nano browser uis
|
||||
|
||||
var/template_data_json = "{}" // An empty JSON object
|
||||
if (templates.len > 0)
|
||||
template_data_json = json_encode(templates)
|
||||
template_data_json = strip_improper(json_encode(templates))
|
||||
|
||||
var/list/send_data = get_send_data(initial_data)
|
||||
var/initial_data_json = replacetext(replacetext(json_encode(send_data), """, """), "'", "'")
|
||||
initial_data_json = strip_improper(initial_data_json);
|
||||
|
||||
var/url_parameters_json = json_encode(list("src" = "\ref[src]"))
|
||||
|
||||
@@ -459,7 +460,7 @@ nanoui is used to open and update nano browser uis
|
||||
var/list/send_data = get_send_data(data)
|
||||
|
||||
//user << list2json(data) // used for debugging
|
||||
user << output(list2params(list(json_encode(send_data))),"[window_id].browser:receiveUpdateData")
|
||||
user << output(list2params(list(strip_improper(json_encode(send_data)))),"[window_id].browser:receiveUpdateData")
|
||||
|
||||
/**
|
||||
* This Topic() proc is called whenever a user clicks on a link within a Nano UI
|
||||
|
||||
Reference in New Issue
Block a user