Skip to content

Commit

Permalink
room: duplicate topic replace in room
Browse files Browse the repository at this point in the history
Make sure topic special chars are dealt with the same way in room as they
are in scroll.php
sarcasticadmin committed Mar 10, 2024
1 parent 28e3f28 commit 6c320ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/room.php
Original file line number Diff line number Diff line change
@@ -397,8 +397,10 @@
$node->{'Time'} = preg_replace('/<[^>]*>/', '', $node->{'Time'});
$node->{'Day'} = preg_replace('/<[^>]*>/', '', $node->{'Day'});

// Remove Spaces so we can use it for a CSS class
// Remove special chars in Topic from XML request so we can use it for a CSS class
$node->{'Topic'} = preg_replace('/\s+/', '', $node->{'Topic'});
$node->{'Topic'} = preg_replace('/\&/', 'and', $node->{'Topic'});
$node->{'Topic'} = preg_replace('/\@/', '', $node->{'Topic'});

$pos = strpos((string) $node->{'Time'}, ",");
$lpos = strrpos((string) $node->{'Time'}, ",");

0 comments on commit 6c320ca

Please sign in to comment.