mirror of https://github.com/BOINC/boinc.git
team_import script: decode entities properly
This commit is contained in:
parent
6245f691bf
commit
f5fea9c3d3
|
@ -82,6 +82,10 @@ $wallpaper = array(
|
||||||
<a href=images/BOINC_background_1_grey.jpg><img src=images/BOINC_background_1_grey_120.jpg></a>
|
<a href=images/BOINC_background_1_grey.jpg><img src=images/BOINC_background_1_grey_120.jpg></a>
|
||||||
<a href=images/BOINC_background_2_blue.jpg><img src=images/BOINC_background_2_blue_120.jpg></a>"
|
<a href=images/BOINC_background_2_blue.jpg><img src=images/BOINC_background_2_blue_120.jpg></a>"
|
||||||
),
|
),
|
||||||
|
array(
|
||||||
|
"Jacob Klein",
|
||||||
|
"<a href=images/boinc_logo_1920x1080.png><img width=180 src=images/boinc_logo_1920x1080.png></a>"
|
||||||
|
),
|
||||||
);
|
);
|
||||||
art_list_head();
|
art_list_head();
|
||||||
art_list_show($wallpaper);
|
art_list_show($wallpaper);
|
||||||
|
|
|
@ -21,7 +21,7 @@ require_once('../inc/util_ops.inc');
|
||||||
|
|
||||||
db_init();
|
db_init();
|
||||||
|
|
||||||
admin_page_head('Manage special users');
|
admin_page_head('Manage user privileges');
|
||||||
|
|
||||||
start_table("align=\"center\"");
|
start_table("align=\"center\"");
|
||||||
row1("Current special users", '9');
|
row1("Current special users", '9');
|
||||||
|
|
|
@ -52,17 +52,21 @@ function lookup_team_seti_id($id) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function decode($x) {
|
||||||
|
return html_entity_decode($x, ENT_COMPAT, 'UTF-8');
|
||||||
|
}
|
||||||
|
|
||||||
function parse_team($f) {
|
function parse_team($f) {
|
||||||
while ($s = fgets($f)) {
|
while ($s = fgets($f)) {
|
||||||
if (strstr($s, '</team>')) {
|
if (strstr($s, '</team>')) {
|
||||||
$t->name = htmlspecialchars_decode($t->name);
|
$t->name = decode($t->name);
|
||||||
$t->url = htmlspecialchars_decode($t->url);
|
$t->url = decode($t->url);
|
||||||
$t->name_html = htmlspecialchars_decode($t->name_html);
|
$t->name_html = decode($t->name_html);
|
||||||
$t->description = htmlspecialchars_decode($t->description);
|
$t->description = decode($t->description);
|
||||||
$t->user_name = htmlspecialchars_decode($t->user_name);
|
$t->user_name = decode($t->user_name);
|
||||||
$t->user_country = htmlspecialchars_decode($t->user_country);
|
$t->user_country = decode($t->user_country);
|
||||||
$t->user_postal_code = htmlspecialchars_decode($t->user_postal_code);
|
$t->user_postal_code = decode($t->user_postal_code);
|
||||||
$t->user_url = htmlspecialchars_decode($t->user_url);
|
$t->user_url = decode($t->user_url);
|
||||||
return $t;
|
return $t;
|
||||||
}
|
}
|
||||||
else if (strstr($s, '<name>')) $t->name = parse_element($s, '<name>');
|
else if (strstr($s, '<name>')) $t->name = parse_element($s, '<name>');
|
||||||
|
|
Loading…
Reference in New Issue