Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

?wikipage does not display injector rules in embed #45

Open
Wreckstation opened this issue Feb 18, 2021 · 1 comment
Open

?wikipage does not display injector rules in embed #45

Wreckstation opened this issue Feb 18, 2021 · 1 comment

Comments

@Wreckstation
Copy link
Contributor

attempt to wikipage a tonic has the effect of that tonic not show up in the embed. Probably because that text is in another part of the xml?

@egocarib
Copy link
Member

egocarib commented Sep 5, 2021

The reason this happens currently is that the ?wikipage style embed was designed to strip out any templates within the desc parameter. In other words, it shows only plain text descriptions from the desc field of the page template.

It was intentionally designed this way - if I remember correctly it was done this way mostly for performance reasons.

If we want to resolve templates inside desc it would require crypto to make additional calls to the ExpandTemplates API, possibly multiple calls to that API for a single description. We could do that, but it might slow down crypto's responses.

look_desc = look_desc.replace('\\n', '\n') # fix raw '\n' in some mutation descriptions
look_desc = WikiPageSummary.strip_templates(look_desc) # remove templates
for common_color_str in ['&C', '&C', '&y', '&W', '&w']: # remove color prefixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants