mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
News: Add support for minisprites (#2300)
Some checks are pending
Node.js CI / build (14.x) (push) Waiting to run
Some checks are pending
Node.js CI / build (14.x) (push) Waiting to run
* News: Add support for minisprites * SANITIZE THE HTML.
This commit is contained in:
parent
72d1216e19
commit
e4e95124f2
|
|
@ -132,7 +132,7 @@
|
|||
options.noMinimize = options.noMinimize || false;
|
||||
|
||||
this.$pmBox[options.append ? 'append' : 'prepend']('<div class="pm-window ' + options.cssClass + '" ' + options.attributes + '><h3><button class="closebutton" tabindex="-1" aria-label="Close"><i class="fa fa-times-circle"></i></button>' + (!options.noMinimize ? '<button class="minimizebutton" tabindex="-1" aria-label="Minimize"><i class="fa fa-minus-circle"></i></button>' : '') + options.title + '</h3><div class="pm-log" style="overflow:visible;height:' + (typeof options.height === 'number' ? options.height + 'px' : options.height) + ';' + (parseInt(options.height, 10) ? 'max-height:none' : (options.maxHeight ? 'max-height:' + (typeof options.maxHeight === 'number' ? options.maxHeight + 'px' : options.maxHeight) : '')) + '">' +
|
||||
options.html +
|
||||
BattleLog.sanitizeHTML(options.html) +
|
||||
'</div></div>');
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,8 @@ includeHeader();
|
|||
$summary = str_replace("[/url]", '</a>', $summary);
|
||||
$summary = str_replace("[b]", '<strong>', $summary);
|
||||
$summary = str_replace("[/b]", '</strong>', $summary);
|
||||
$summary = preg_replace('/\[psicon (pokemon|item|type|category)="([^\]]+)"\]/', '<psicon $1="$2" />', $summary);
|
||||
$summary = preg_replace('/\[psicon (pokemon|item|type|category)=([^\]]+)\]/', '<psicon $1="$2" />', $summary);
|
||||
$summary = '<p>'.$summary.'</p>';
|
||||
|
||||
$newsCache[$topic_id]['summary_html'] = $summary;
|
||||
|
|
@ -88,6 +90,8 @@ includeHeader();
|
|||
$details = str_replace("[/url]", '</a>', $details);
|
||||
$details = str_replace("[b]", '<strong>', $details);
|
||||
$details = str_replace("[/b]", '</strong>', $details);
|
||||
$details = preg_replace('/\[psicon (pokemon|item|type|category)="([^\]]+)"\]/', '<psicon $1="$2" />', $details);
|
||||
$details = preg_replace('/\[psicon (pokemon|item|type|category)=([^\]]+)\]/', '<psicon $1="$2" />', $details);
|
||||
$details = '<p>'.$details.'</p>';
|
||||
$newsCache[$topic_id]['details_html'] = $details;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user