Apple Computer Hardware manual Allowing Specific Html Tags and Attributes, Tag Attributes

Page 33

For example, to allow the use of the font-size style attribute, create the following block:

<key>styles</key>

<array> <string>font-size</string>

</array>

To allow the HTML “style” attribute, add the “style” attribute to the “_all_” tag, which is described in the following section.

Allowing Specific HTML Tags and Attributes

YouTube, Flash, and other advanced web formats usually require HTML tags and attributes that aren’t allowed by default. For example, YouTube requires the following tags and attributes:

Tag

Attributes

object

width, height

 

 

param

name, value

 

 

embed

src, type, width, height

 

 

Because these HTML tags or attributes aren’t included in the built-in whitelist, you must add them to the custom whitelist.

To allow specific HTML tags and attributes:

1Create a tags key and follow it with a dict.

2In the dict, create keys named after the HTML tags.

To allow a specific attribute for all HTML tags, create a key named “_all_”.

3After each key, create string arrays listing allowed tag attributes.

For example, to support YouTube, create the following block:

<key>tags</key>

<dict>

<key>object</key>

<array>

<string>width</string>

<string>height</string>

</array>

<key>param</key>

<array>

<string>name</string>

<string>value</string>

</array>

<key>embed</key>

Chapter 2    Allowing Specific Protocols, CSS Styles, and HTML Tags and Attributes

33

Image 33
Contents Mac OS X Server 019-1252/2008-04-24 Contents Managing Wiki Content Preface Getting Additional InformationPreface About This Guide Theme File Structure Overview This chapter describes how to customize a wiki’s appearanceCustomizing How the Wiki Looks Variant Theme File Structure Overview File or Folder Name Purpose Wireframe Theme File Structure OverviewBorders, and positioning for comment entry Creating a Theme Terminal, enter the following commandsWebsite Editing CSS FilesAbout Property List Editor Editing Property List FilesAbout Property List Keys and Values About Property List FilesAbout Strings About DictionariesHere is the sidebars array in a plain text editor About ErrorsHere is an example of an array with a single string Here is an example of an array with multiple stringsChanging General Theme Settings Key Default Value Possible ValuesDescription Understanding the Types of Sidebars Creating SidebarsShared Keys All sidebars require the following keysStatic Unique Keys Each dictionary entry has the following keysKey Example Value Possible Values Optional or Required Search Unique Keys Calendar Unique Keys Tag Unique Keys Overview of the Example SidebarsRecent Activity Unique Keys Sidebar Name DescriptionUsing the Example Sidebars Terminal, enter the following commandTo comment out specific sidebars To this Adding JavaScript and XSL Files To add JavaScript files or XSL files to a themePut JavaScript .js files or XSL .xsl files in this folder About JavaScript Here are some published JavaScript guidesTopic JavaScript Example About XSLCreate a plain text file with the following content Viewing Dynamic XMLTo view context $ sudo serveradmin stop teams sudo serveradmin start teams Attributes Creating a Custom Whitelist About the Custom Whitelist’s Structure Allowing Specific URL ProtocolsAllowing Specific CSS Styles Allowing Specific Html Tags and Attributes To allow specific Html tags and attributesTag Attributes Protocols Allowed in the Built-in Whitelist About the Built-in WhitelistBuilt-in whitelist allows these protocols ProtocolHtml Tags and Attributes Allowed in the Built-in Whitelist CSS Styles Allowed in the Built-in WhitelistBuilt-in whitelist allows these CSS styles Built-in whitelist allows these Html tags and attributesNode Pre Cite Span Strong Tbody Tfoot Colspan, rowspan Thead Backing Up the Wiki Server Migrating Wiki Content From Other WebsitesManaging Wiki Content Wiki File Structure Overview File or Folder Name Purpose Manually Editing Raw ContentViewing a Wiki’s Administration Settings To regenerate the index after editing raw wiki contentFor more information about AtomPub, see Key Example Value Description Metadata.plist file includes the following keysTo manually edit wiki administration settings Pageuid Viewing a Page’s MetainformationManaging Attachments