Dotclear 2.24
Loading...
Searching...
No Matches
html Class Reference

HTML utilities. More...

Static Public Member Functions

static escapeHTML (?string $str)
 
static decodeEntities (?string $str, $keep_special=false)
 
static clean (?string $str)
 
static escapeJS (?string $str)
 
static escapeURL (?string $str)
 
static sanitizeURL (?string $str)
 
static stripHostURL (?string $url)
 
static absoluteURLs (?string $str, ?string $root)
 

Static Public Attributes

static $absolute_regs
 

Detailed Description

HTML utilities.

Member Function Documentation

◆ escapeHTML()

static escapeHTML ( ?string  $str)
static

HTML escape

Replaces HTML special characters by entities.

Parameters
string$strString to escape
Returns
string

Referenced by tagsBehaviors\adminAddTags(), tagsBehaviors\adminRemoveTags(), defaultWidgets\bestof(), adminMediaPage\breadcrumb(), defaultWidgets\categories(), dcPage\close(), dcPage\cssLoad(), dcUtils\cssLoad(), adminModulesList\displaySearch(), dcDefaultPostActions\doChangePostAuthor(), dcDefaultPostActions\doChangePostCategory(), dcDefaultPostActions\doChangePostLang(), dcBlogsActions\error(), dcCommentsActions\error(), dcPostsActions\error(), dcPagesActions\error(), defaultWidgets\feed(), dcThemeEditor\filesList(), dcWidget\formSetting(), rsExtPost\getAuthorLink(), rsExtComment\getAuthorLink(), dcAdminCombos\getCategoriesCombo(), adminMediaFilter\getLinkTypeFilter(), tplBlogroll\getList(), adminPostFilter\getPostCategoriesFilter(), dcIeModule\getURL(), dcExportFlat\gui(), dcImportDC1\gui(), dcImportFeed\gui(), dcImportFlat\gui(), dcImportWP\gui(), dcFilterIpLookup\gui(), dcFilterWords\gui(), dcSpamFilter\guiLink(), adminAuth\init(), adminBlogTheme\init(), adminCategory\init(), adminPost\init(), adminUserPrefs\init(), adminUpdate\init(), adminBlogrollEdit\init(), ieMaintenanceExportblog\init(), adminPage\init(), adminSimpleMenu\init(), defaultWidgets\init(), dcUtils\jsJson(), dcPage\jsLoad(), dcUtils\jsLoad(), defaultWidgets\langs(), defaultWidgets\lastcomments(), defaultWidgets\lastposts(), linksWidget(), adminImportExport\listImportExportModules(), defaultWidgets\navigation(), dcPage\open(), dcPage\openPopup(), tplPages\pagesWidget(), dcTrackback\ping(), pingsAdminBehaviors\pingsFormItems(), adminUserPreferences\prefLine(), dcPage\preload(), adminAuth\process(), adminBlog\process(), adminBlogDel\process(), adminCategories\process(), adminCategory\process(), adminLangs\process(), adminMedia\process(), adminMediaItem\process(), adminPost\process(), adminUpdate\process(), adminUser\process(), adminBlogrollEdit\process(), adminBlogroll\process(), dcTrackback\receivePingback(), dcTrackback\receiveTrackback(), dcTrackback\receiveWebmention(), dcModules\registerModule(), adminAuth\render(), adminBlogTheme\render(), adminCategories\render(), adminCategory\render(), adminComment\render(), adminComments\render(), adminHelp\render(), adminIndex\render(), adminLangs\render(), adminMedia\render(), adminPlugins\render(), adminPopupLink\render(), adminPopupPosts\render(), adminPost\render(), adminPosts\render(), adminUserPrefs\render(), adminSearch\render(), adminUpdate\render(), adminUser\render(), adminUsersActions\render(), adminAboutConfig\render(), adminAntispam\render(), adminBlogrollEdit\render(), adminBlogroll\render(), adminBlowupConfig\render(), adminImportExport\render(), adminMaintenance\render(), adminPages\render(), adminPage\render(), adminPings\render(), adminSimpleMenu\render(), adminTag\render(), adminTags\render(), adminThemeEditor\render(), adminUserPreferences\render(), adminWidgets\render(), adminConfigThemeCustomCSS\render(), adminConfigThemeDuctile\render(), adminPlugins\renderConfig(), dcWidget\renderDiv(), defaultWidgets\search(), adminAboutConfig\settingLine(), dcPager\setURL(), pager\setURL(), adminPost\showComments(), adminWidgets\sidebarWidgets(), dcMaintenanceRest\step(), defaultWidgets\subscribe(), testEscapeHTML(), defaultWidgets\text(), dcCore\wikiPostLink(), and urlBlogroll\xbel().

◆ decodeEntities()

static decodeEntities ( ?string  $str,
  $keep_special = false 
)
static

Decode HTML entities

Returns a string with all entities decoded.

Parameters
string$strString to protect
string | bool$keep_specialKeep special characters: > < &
Returns
string

Referenced by htmlFilter\apply(), rsExtComment\getTrackbackTitle(), dcImportDC1\importPost(), adminPost\init(), imageMeta\readXMP(), dcTrackback\receivePingback(), dcTrackback\receiveTrackback(), dcTrackback\receiveWebmention(), and testDecodeEntities().

◆ clean()

◆ escapeJS()

static escapeJS ( ?string  $str)
static

Javascript escape

Returns a protected JavaScript string

Parameters
string$strString to protect
Returns
string

Referenced by dcPage\jsVar(), dcPage\jsVars(), dcUtils\jsVars(), adminUserPrefs\render(), adminBlogroll\render(), adminSimpleMenu\render(), and testEscapeJS().

◆ escapeURL()

static escapeURL ( ?string  $str)
static

URL escape

Returns an escaped URL string for HTML content

Parameters
string$strString to escape
Returns
string

Referenced by dcCore\getPostAdminURL(), dcCore\getPostPublicURL(), dcFilterAkismet\gui(), dcFilterIpLookup\gui(), dcFilterWords\gui(), adminPage\init(), adminMedia\process(), adminMedia\render(), adminUsersActions\render(), adminPage\render(), and testEscapeURL().

◆ sanitizeURL()

static sanitizeURL ( ?string  $str)
static

◆ stripHostURL()

static stripHostURL ( ?string  $url)
static

Remove host in URL

Removes host part in URL

Parameters
string$urlURL to transform
Returns
string

Referenced by dcBlog\getPF(), dcBlog\getVF(), adminSimpleMenu\init(), installSimpleMenu\install(), adminSimpleMenu\process(), testStripHostURL(), and tagsBehaviors\wiki2xhtmlTag().

◆ absoluteURLs()

static absoluteURLs ( ?string  $str,
?string  $root 
)
static

Set links to absolute ones

Appends $root URL to URIs attributes in $str.

Parameters
string$strHTML to transform
string$rootBase URL
Returns
string

Referenced by rsExtPost\getContent(), rsExtComment\getContent(), rsExtPost\getExcerpt(), and testAbsoluteURLs().

Field Documentation

◆ $absolute_regs

$absolute_regs
static
Initial value:
= [
'/((?:action|cite|data|download|formaction|href|imagesrcset|itemid|itemprop|itemtype|ping|poster|src|srcset)=")(.*?)(")/msu',
]

Referenced by testAbsoluteURLs().


The documentation for this class was generated from the following file: