Template:COinS safe/doc

From WikiAlpha
Jump to: navigation, search
The below content is licensed according to Creative Commons Attribution-ShareAlike License contrary to the public domain logo at the foot of the page. It originally appeared on http://en.wikipedia.org. The original article might still be accessible here. You may be able to find a list of the article's previous contributors on the talk page.

Usage

This template is a notice for templates that may be used in citation templates. By default, it indicates the template is safe for use as shown above.

To indicate a template that should not be used in a citation template:

{{COinS safe|n}}

  • |addtext= — additional text shown after the main message

When the template is set to not safe, the page is placed into Category:Templates not safe for use in citation templates.

Issue

Citation templates such as Citation Style 1 and Citation Style 2 generate COinS metadata. If a template is used in a citation template field, then it may inject HTML into the metadata.

Compare the rendered HTML for {{cite book}} with |author= using no template and using {{smallcaps}}.

Template:Markup

The author metadata is in the Template:Code field. In this case, it is percent-encoded and is rendered as <span class="smallcaps" style="font-variant:small-caps;">Sam Drucker</span>

Reference management software will interpret the entire span as the author name.

See also