StripMarkup extension

From FollowTheScore
Jump to: navigation, search

The StripMarkup extension removes all wiki and html markup from a portion of wikitext.

It can be used as a parser extension or as a parser function.

Example:
* this is a list
* with a [[Main Page]] hyperlink

would normally look like this:

but would look like this, if it were placed between 'stripmarkup' tags:

<stripmarkup>

</stripmarkup>

The same could be achieved with parser function syntax:

{{#stripmarkup:

  • this is a list
  • with a aaa hyperlink

}}

Note that nothing remains from the hyperlink.

Possible area of usage

When you create a table with DPL which shall be exported to Excel, it may be useful to strip the markup because Excel cannot deal with markup very well. You might get unwanted line breaks etc. Using StripMarkup you can at least transfer the 'plain text'.