Template:Clean Pagename From ask

The  inline query returns pages with additional characters in the string. This causes an error message when nesting inline queries: :The part &quot;|&quot; of the query was not understood. Results might not be as expected.

Also, sometimes page links from inline queries show up as preceded by a colon, which looks weird.

This template cleans up page links from inline query results to get around these problems.

Usage
Parameter  returns

Parameter  returns

Parameter  returns

Any other page reference should be returned intact.