Skip to content

Conversation

@sunafterrainwm
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label May 9, 2021
@sunafterrainwm sunafterrainwm force-pushed the feature-copyvio-templates-non-wikitext-pages branch from 981903b to 85e2a76 Compare May 9, 2021 14:20
@github-actions github-actions bot removed the dependencies Pull requests that update a dependency file label May 9, 2021
@Xi-Plus
Copy link
Member

Xi-Plus commented May 10, 2021

json不也需要parse嗎?不過我個人覺得parse的作法有點醜陋,把上面的subst改成safesubst就能適度的顯示模板了(只有簽名不會展開,但應可忽略)

taggingArticle: function(pageobj) {
var params = pageobj.getCallbackParameters();
var tag = '{{subst:Copyvio/auto|url=' + params.source.replace(/http/g, 'http').replace(/\n+/g, '\n').replace(/^\s*([^*])/gm, '* $1').replace(/^\* $/m, '') + '|OldRevision=' + mw.config.get('wgRevisionId') + '}}';
var tag = '{{safeubst:Copyvio/auto|url=' + params.source.replace(/http/g, 'http').replace(/\n+/g, '\n').replace(/^\s*([^*])/gm, '* $1').replace(/^\* $/m, '') + '|OldRevision=' + mw.config.get('wgRevisionId') + '}}';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

safesubst

@sunafterrainwm
Copy link
Contributor Author

等待 #215 完成

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants