ILIAS
Release_4_1_x_branch Revision 61804
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
ILIAS
Todo List
Deprecated List
Modules
Namespaces
Data Structures
Files
File List
classes
cron
include
Modules
Services
AccessControl
Accessibility
Accordion
Administration
AdvancedEditing
AdvancedMetaData
AuthApache
Authentication
AuthShibboleth
Block
Booking
Cache
Calendar
CAS
Certificate
Clipboard
Component
Contact
Container
ContainerReference
COPage
CopyWizard
Database
DataSet
Dom
EventHandling
Excel
Exceptions
Export
Feedback
Feeds
FileSystemStorage
Form
Frameset
GoogleMaps
Help
Html
classes
exceptions
HtmlPurifier
library
HTMLPurifier
AttrDef
CSS
HTML
Bool.php
Class.php
Color.php
FrameTarget.php
ID.php
Length.php
LinkTypes.php
MultiLength.php
Nmtokens.php
Pixels.php
URI
CSS.php
Enum.php
Integer.php
Lang.php
Switch.php
Text.php
URI.php
AttrTransform
ChildDef
ConfigSchema
DefinitionCache
Filter
HTMLModule
Injector
Language
Lexer
Printer
Strategy
TagTransform
Token
URIFilter
URIScheme
VarParser
AttrCollections.php
AttrDef.php
AttrTransform.php
AttrTypes.php
AttrValidator.php
Bootstrap.php
ChildDef.php
Config.php
ConfigSchema.php
ContentSets.php
Context.php
CSSDefinition.php
Definition.php
DefinitionCache.php
DefinitionCacheFactory.php
Doctype.php
DoctypeRegistry.php
ElementDef.php
Encoder.php
EntityLookup.php
EntityParser.php
ErrorCollector.php
ErrorStruct.php
Exception.php
Filter.php
Generator.php
HTMLDefinition.php
HTMLModule.php
HTMLModuleManager.php
IDAccumulator.php
Injector.php
Language.php
LanguageFactory.php
Length.php
Lexer.php
PercentEncoder.php
Printer.php
PropertyList.php
PropertyListIterator.php
Strategy.php
StringHash.php
StringHashParser.php
TagTransform.php
Token.php
TokenFactory.php
UnitConverter.php
URI.php
URIDefinition.php
URIFilter.php
URIParser.php
URIScheme.php
URISchemeRegistry.php
VarParser.php
VarParserException.php
HTMLPurifier.auto.php
HTMLPurifier.autoload.php
HTMLPurifier.func.php
HTMLPurifier.includes.php
HTMLPurifier.kses.php
HTMLPurifier.path.php
HTMLPurifier.php
HTMLPurifier.safe-includes.php
interfaces
InfoScreen
Init
JSON
Language
LDAP
License
LinkChecker
LoadTest
Locator
Logging
Mail
MainMenu
Math
MediaObjects
Membership
MetaData
Migration
Navigation
News
Notes
Notification
Object
OpenId
OrgUnit
Payment
PEAR
PermanentLink
PersonalDesktop
PHPUnit
PrivacySecurity
QTI
Radius
Rating
Registration
Repository
RTE
Search
SOAPAuth
Style
Survey
Table
Tagging
Tracking
Transformation
Tree
UIComponent
User
Utilities
WebAccessChecker
WebDAV
WebServices
Workflow
XHTMLPage
XHTMLValidator
Xml
YUI
setup
sso
webservice
calendar.php
confirmReg.php
error.php
feed.php
goto.php
ilias.php
index.php
login.php
logout.php
payment.php
privfeed.php
pwassist.php
register.php
repository.php
rootindex.php
sessioncheck.php
shib_login.php
shib_logout.php
start.php
studip_referrer.php
webdav.php
Globals
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
Nmtokens.php
Go to the documentation of this file.
1
<?php
2
6
class
HTMLPurifier_AttrDef_HTML_Nmtokens
extends
HTMLPurifier_AttrDef
7
{
8
9
public
function
validate
($string,
$config
, $context) {
10
11
$string = trim($string);
12
13
// early abort: '' and '0' (strings that convert to false) are invalid
14
if
(!$string)
return
false
;
15
16
$tokens = $this->
split
($string,
$config
, $context);
17
$tokens = $this->
filter
($tokens,
$config
, $context);
18
if
(empty($tokens))
return
false
;
19
return
implode(
' '
, $tokens);
20
21
}
22
26
protected
function
split
($string,
$config
, $context) {
27
// OPTIMIZABLE!
28
// do the preg_match, capture all subpatterns for reformulation
29
30
// we don't support U+00A1 and up codepoints or
31
// escaping because I don't know how to do that with regexps
32
// and plus it would complicate optimization efforts (you never
33
// see that anyway).
34
$pattern =
'/(?:(?<=\s)|\A)'
.
// look behind for space or string start
35
'((?:--|-?[A-Za-z_])[A-Za-z_\-0-9]*)'
.
36
'(?:(?=\s)|\z)/'
;
// look ahead for space or string end
37
preg_match_all($pattern, $string, $matches);
38
return
$matches[1];
39
}
40
46
protected
function
filter
($tokens,
$config
, $context) {
47
return
$tokens;
48
}
49
50
}
51
52
// vim: et sw=4 sts=4
Services
Html
HtmlPurifier
library
HTMLPurifier
AttrDef
HTML
Nmtokens.php
Generated on Thu Apr 21 2016 19:02:50 for ILIAS by
1.8.1.2 (using
Doxyfile
)