Added vendor directory to source control
14
vendor/abraham/twitteroauth/.github/dependabot.yml
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: '/'
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
time: '11:00'
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: composer
|
||||||
|
directory: '/'
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
time: '11:00'
|
||||||
|
open-pull-requests-limit: 10
|
12
vendor/abraham/twitteroauth/.github/workflows/lint.yaml
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
name: Lint
|
||||||
|
on: push
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run lint
|
18
vendor/abraham/twitteroauth/.github/workflows/test.yaml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
name: Test
|
||||||
|
on: push
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.2', '7.3', '7.4']
|
||||||
|
name: PHP ${{ matrix.php-versions }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
- run: composer validate --no-interaction --strict
|
||||||
|
- run: composer install --no-interaction --prefer-dist
|
||||||
|
- run: npm test
|
5
vendor/abraham/twitteroauth/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
.DS_Store
|
||||||
|
vendor
|
||||||
|
env
|
||||||
|
*.cache
|
||||||
|
node_modules
|
2
vendor/autoload.php
vendored
|
@ -4,4 +4,4 @@
|
||||||
|
|
||||||
require_once __DIR__ . '/composer/autoload_real.php';
|
require_once __DIR__ . '/composer/autoload_real.php';
|
||||||
|
|
||||||
return ComposerAutoloaderInit51528b4a875f8e0aa6970f42ad88c832::getLoader();
|
return ComposerAutoloaderInit4eca095a43f7c8c6d8c0f7669b7856c7::getLoader();
|
||||||
|
|
36
vendor/aws/aws-crt-php/.github/ISSUE_TEMPLATE/---bug-report.md
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
---
|
||||||
|
name: "\U0001F41B Bug report"
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: bug, needs-triage
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Confirm by changing [ ] to [x] below to ensure that it's a bug:
|
||||||
|
- [ ] I've gone though [Developer Guide](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/welcome.html) and [API reference](http://sdk.amazonaws.com/cpp/api/LATEST/index.html)
|
||||||
|
- [ ] I've searched for [previous similar issues](https://github.com/aws/aws-sdk-cpp/issues) and didn't find any solution
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**SDK version number**
|
||||||
|
|
||||||
|
**Platform/OS/Hardware/Device**
|
||||||
|
What are you running the sdk on?
|
||||||
|
|
||||||
|
**To Reproduce (observed behavior)**
|
||||||
|
Steps to reproduce the behavior (please share code)
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Logs/output**
|
||||||
|
If applicable, add logs or error output.
|
||||||
|
|
||||||
|
*REMEMBER TO SANITIZE YOUR PERSONAL INFO*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
20
vendor/aws/aws-crt-php/.github/ISSUE_TEMPLATE/---feature-request.md
vendored
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
name: "\U0001F680 Feature request"
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: feature-request, needs-triage
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
23
vendor/aws/aws-crt-php/.github/ISSUE_TEMPLATE/---questions-help.md
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
name: "\U0001F4AC Questions / Help"
|
||||||
|
about: If you have questions, please check AWS Forums or StackOverflow
|
||||||
|
title: ''
|
||||||
|
labels: guidance, needs-triage
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Confirm by changing [ ] to [x] below:
|
||||||
|
- [ ] I've searched for [previous similar issues](https://github.com/awslabs/aws-crt-php/issues) and didn't find any solution
|
||||||
|
|
||||||
|
**Platform/OS/Hardware/Device**
|
||||||
|
What are you running the sdk on?
|
||||||
|
|
||||||
|
**Describe the question**
|
||||||
|
|
||||||
|
|
||||||
|
**Logs/output**
|
||||||
|
If applicable, add logs or error output.
|
||||||
|
|
||||||
|
*REMEMBER TO SANITIZE YOUR PERSONAL INFO*
|
||||||
|
|
6
vendor/aws/aws-crt-php/.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
*Issue #, if available:*
|
||||||
|
|
||||||
|
*Description of changes:*
|
||||||
|
|
||||||
|
|
||||||
|
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
|
145
vendor/aws/aws-crt-php/.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,145 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
- '!main'
|
||||||
|
|
||||||
|
env:
|
||||||
|
BUILDER_VERSION: v0.8.18
|
||||||
|
BUILDER_SOURCE: releases
|
||||||
|
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
|
||||||
|
PACKAGE_NAME: aws-crt-php
|
||||||
|
LINUX_BASE_IMAGE: ubuntu-16-x64
|
||||||
|
RUN: ${{ github.run_id }}-${{ github.run_number }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
php-5_5-linux-x64:
|
||||||
|
name: php-linux-x64 (5.5)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Setup PHP with Xdebug
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
coverage: xdebug
|
||||||
|
php-version: 5.5
|
||||||
|
ini-values: xdebug.overload_var_dump=0, memory_limit=4G, phar.readonly=false
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install ancient PHPUnit
|
||||||
|
run: composer require --dev --ignore-platform-reqs phpunit/phpunit "4.8.36"
|
||||||
|
|
||||||
|
- name: Install depedencies
|
||||||
|
run: composer update --no-interaction
|
||||||
|
|
||||||
|
- name: Build for PHP 5.5
|
||||||
|
env:
|
||||||
|
CC: clang
|
||||||
|
CXX: clang++
|
||||||
|
run: |
|
||||||
|
phpize
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
|
||||||
|
php-linux-x64:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
version:
|
||||||
|
- "5.6"
|
||||||
|
- "7.0"
|
||||||
|
- "7.1"
|
||||||
|
- "7.2"
|
||||||
|
- "7.3"
|
||||||
|
- "7.4"
|
||||||
|
- "8.0"
|
||||||
|
steps:
|
||||||
|
- name: Setup PHP with Xdebug
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
coverage: xdebug
|
||||||
|
php-version: ${{matrix.version}}
|
||||||
|
ini-values: xdebug.overload_var_dump=0, memory_limit=4G, phar.readonly=false
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install depedencies
|
||||||
|
run: composer update --no-interaction
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
env:
|
||||||
|
CC: clang
|
||||||
|
CXX: clang++
|
||||||
|
run: |
|
||||||
|
phpize
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make test
|
||||||
|
|
||||||
|
|
||||||
|
# linux-arm:
|
||||||
|
# name: ARM (${{ matrix.arch }})
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# strategy:
|
||||||
|
# matrix:
|
||||||
|
# arch: [armv6, armv7, arm64]
|
||||||
|
# steps:
|
||||||
|
# - name: Build ${{ env.PACKAGE_NAME }}
|
||||||
|
# run: |
|
||||||
|
# python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
|
||||||
|
# chmod a+x builder
|
||||||
|
# ./builder build -p ${{ env.PACKAGE_NAME }} --target=linux-${{ matrix.arch }} --spec=downstream
|
||||||
|
|
||||||
|
# windows-vc16:
|
||||||
|
# runs-on: windows-latest
|
||||||
|
# strategy:
|
||||||
|
# matrix:
|
||||||
|
# arch: [x64]
|
||||||
|
# steps:
|
||||||
|
# - uses: ilammy/msvc-dev-cmd@v1
|
||||||
|
# with:
|
||||||
|
# arch: ${{ matrix.arch }}
|
||||||
|
# uwp: false
|
||||||
|
# spectre: true
|
||||||
|
# - name: Build ${{ env.PACKAGE_NAME }} + consumers
|
||||||
|
# run: |
|
||||||
|
# python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
|
||||||
|
# python builder.pyz build -p ${{ env.PACKAGE_NAME }} --spec=downstream
|
||||||
|
|
||||||
|
# windows-vc14:
|
||||||
|
# runs-on: windows-latest
|
||||||
|
# strategy:
|
||||||
|
# matrix:
|
||||||
|
# arch: [x86, x64]
|
||||||
|
# steps:
|
||||||
|
# - uses: ilammy/msvc-dev-cmd@v1
|
||||||
|
# with:
|
||||||
|
# toolset: 14.0
|
||||||
|
# arch: ${{ matrix.arch }}
|
||||||
|
# uwp: false
|
||||||
|
# spectre: true
|
||||||
|
# - name: Build ${{ env.PACKAGE_NAME }} + consumers
|
||||||
|
# run: |
|
||||||
|
# python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
|
||||||
|
# python builder.pyz build -p ${{ env.PACKAGE_NAME }} downstream
|
||||||
|
|
||||||
|
macos:
|
||||||
|
runs-on: macos-${{ matrix.version }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
version: [10.15]
|
||||||
|
steps:
|
||||||
|
- name: Build PHP 8 extension and test
|
||||||
|
run: |
|
||||||
|
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
|
||||||
|
chmod a+x builder
|
||||||
|
./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream
|
29
vendor/aws/aws-crt-php/.github/workflows/lint.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
name: Lint
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
clang-format:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Sources
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: clang-format lint
|
||||||
|
uses: DoozyX/clang-format-lint-action@v0.3.1
|
||||||
|
with:
|
||||||
|
# List of extensions to check
|
||||||
|
extensions: c
|
||||||
|
|
||||||
|
check-submodules:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Source
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Check Submodules
|
||||||
|
uses: awslabs/aws-crt-builder/.github/actions/check-submodules@main
|
46
vendor/aws/aws-crt-php/.github/workflows/stale_issue.yml
vendored
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
name: "Close stale issues"
|
||||||
|
|
||||||
|
# Controls when the action will run.
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cleanup:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Stale issue job
|
||||||
|
steps:
|
||||||
|
- uses: aws-actions/stale-issue-cleanup@v3
|
||||||
|
with:
|
||||||
|
# Setting messages to an empty string will cause the automation to skip
|
||||||
|
# that category
|
||||||
|
ancient-issue-message: Greetings! Sorry to say but this is a very old issue that is probably not getting as much attention as it deservers. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to open a new one.
|
||||||
|
stale-issue-message: Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.
|
||||||
|
stale-pr-message: Greetings! It looks like this PR hasn’t been active in longer than a week, add a comment or an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.
|
||||||
|
|
||||||
|
# These labels are required
|
||||||
|
stale-issue-label: closing-soon
|
||||||
|
exempt-issue-label: automation-exempt
|
||||||
|
stale-pr-label: closing-soon
|
||||||
|
exempt-pr-label: pr/needs-review
|
||||||
|
response-requested-label: response-requested
|
||||||
|
|
||||||
|
# Don't set closed-for-staleness label to skip closing very old issues
|
||||||
|
# regardless of label
|
||||||
|
closed-for-staleness-label: closed-for-staleness
|
||||||
|
|
||||||
|
# Issue timing
|
||||||
|
days-before-stale: 7
|
||||||
|
days-before-close: 4
|
||||||
|
days-before-ancient: 365
|
||||||
|
|
||||||
|
# If you don't want to mark a issue as being ancient based on a
|
||||||
|
# threshold of "upvotes", you can set this here. An "upvote" is
|
||||||
|
# the total number of +1, heart, hooray, and rocket reactions
|
||||||
|
# on an issue.
|
||||||
|
minimum-upvotes-to-exempt: 1
|
||||||
|
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
loglevel: DEBUG
|
||||||
|
# Set dry-run to true to not perform label or close actions.
|
||||||
|
dry-run: false
|
210
vendor/aws/aws-crt-php/.gitignore
vendored
Normal file
|
@ -0,0 +1,210 @@
|
||||||
|
|
||||||
|
# Created by https://www.toptal.com/developers/gitignore/api/autotools,cmake,phpstorm
|
||||||
|
# Edit at https://www.toptal.com/developers/gitignore?templates=autotools,cmake,phpstorm
|
||||||
|
|
||||||
|
### Autotools ###
|
||||||
|
# http://www.gnu.org/software/automake
|
||||||
|
|
||||||
|
Makefile.in
|
||||||
|
/ar-lib
|
||||||
|
/mdate-sh
|
||||||
|
/py-compile
|
||||||
|
/test-driver
|
||||||
|
/ylwrap
|
||||||
|
.deps/
|
||||||
|
|
||||||
|
# http://www.gnu.org/software/autoconf
|
||||||
|
|
||||||
|
autom4te.cache
|
||||||
|
/autoscan.log
|
||||||
|
/autoscan-*.log
|
||||||
|
/aclocal.m4
|
||||||
|
/compile
|
||||||
|
/config.guess
|
||||||
|
/config.h.in
|
||||||
|
/config.log
|
||||||
|
/config.status
|
||||||
|
/config.sub
|
||||||
|
/configure
|
||||||
|
/configure.scan
|
||||||
|
/depcomp
|
||||||
|
/install-sh
|
||||||
|
/missing
|
||||||
|
/stamp-h1
|
||||||
|
|
||||||
|
# https://www.gnu.org/software/libtool/
|
||||||
|
|
||||||
|
/ltmain.sh
|
||||||
|
|
||||||
|
# http://www.gnu.org/software/texinfo
|
||||||
|
|
||||||
|
/texinfo.tex
|
||||||
|
|
||||||
|
# http://www.gnu.org/software/m4/
|
||||||
|
|
||||||
|
m4/libtool.m4
|
||||||
|
m4/ltoptions.m4
|
||||||
|
m4/ltsugar.m4
|
||||||
|
m4/ltversion.m4
|
||||||
|
m4/lt~obsolete.m4
|
||||||
|
|
||||||
|
# Generated Makefile
|
||||||
|
# (meta build system like autotools,
|
||||||
|
# can automatically generate from config.status script
|
||||||
|
# (which is called by configure script))
|
||||||
|
Makefile
|
||||||
|
|
||||||
|
### Autotools Patch ###
|
||||||
|
|
||||||
|
### CMake ###
|
||||||
|
CMakeLists.txt.user
|
||||||
|
CMakeCache.txt
|
||||||
|
CMakeFiles
|
||||||
|
CMakeScripts
|
||||||
|
Testing
|
||||||
|
cmake_install.cmake
|
||||||
|
install_manifest.txt
|
||||||
|
compile_commands.json
|
||||||
|
CTestTestfile.cmake
|
||||||
|
_deps
|
||||||
|
|
||||||
|
### CMake Patch ###
|
||||||
|
# External projects
|
||||||
|
*-prefix/
|
||||||
|
|
||||||
|
### PhpStorm ###
|
||||||
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||||
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
|
# User-specific stuff
|
||||||
|
.idea/**/workspace.xml
|
||||||
|
.idea/**/tasks.xml
|
||||||
|
.idea/**/usage.statistics.xml
|
||||||
|
.idea/**/dictionaries
|
||||||
|
.idea/**/shelf
|
||||||
|
.idea/
|
||||||
|
# Generated files
|
||||||
|
.idea/**/contentModel.xml
|
||||||
|
|
||||||
|
# Sensitive or high-churn files
|
||||||
|
.idea/**/dataSources/
|
||||||
|
.idea/**/dataSources.ids
|
||||||
|
.idea/**/dataSources.local.xml
|
||||||
|
.idea/**/sqlDataSources.xml
|
||||||
|
.idea/**/dynamic.xml
|
||||||
|
.idea/**/uiDesigner.xml
|
||||||
|
.idea/**/dbnavigator.xml
|
||||||
|
|
||||||
|
# Gradle
|
||||||
|
.idea/**/gradle.xml
|
||||||
|
.idea/**/libraries
|
||||||
|
|
||||||
|
# Gradle and Maven with auto-import
|
||||||
|
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||||
|
# since they will be recreated, and may cause churn. Uncomment if using
|
||||||
|
# auto-import.
|
||||||
|
# .idea/artifacts
|
||||||
|
# .idea/compiler.xml
|
||||||
|
# .idea/jarRepositories.xml
|
||||||
|
# .idea/modules.xml
|
||||||
|
# .idea/*.iml
|
||||||
|
# .idea/modules
|
||||||
|
# *.iml
|
||||||
|
# *.ipr
|
||||||
|
|
||||||
|
# CMake
|
||||||
|
cmake-build-*/
|
||||||
|
|
||||||
|
# Mongo Explorer plugin
|
||||||
|
.idea/**/mongoSettings.xml
|
||||||
|
|
||||||
|
# File-based project format
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
out/
|
||||||
|
|
||||||
|
# mpeltonen/sbt-idea plugin
|
||||||
|
.idea_modules/
|
||||||
|
|
||||||
|
# JIRA plugin
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
# Cursive Clojure plugin
|
||||||
|
.idea/replstate.xml
|
||||||
|
|
||||||
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||||
|
com_crashlytics_export_strings.xml
|
||||||
|
crashlytics.properties
|
||||||
|
crashlytics-build.properties
|
||||||
|
fabric.properties
|
||||||
|
|
||||||
|
# Editor-based Rest Client
|
||||||
|
.idea/httpRequests
|
||||||
|
|
||||||
|
# Android studio 3.1+ serialized cache file
|
||||||
|
.idea/caches/build_file_checksums.ser
|
||||||
|
|
||||||
|
### PhpStorm Patch ###
|
||||||
|
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
||||||
|
|
||||||
|
# *.iml
|
||||||
|
# modules.xml
|
||||||
|
# .idea/misc.xml
|
||||||
|
# *.ipr
|
||||||
|
|
||||||
|
# Sonarlint plugin
|
||||||
|
# https://plugins.jetbrains.com/plugin/7973-sonarlint
|
||||||
|
.idea/**/sonarlint/
|
||||||
|
|
||||||
|
# SonarQube Plugin
|
||||||
|
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
|
||||||
|
.idea/**/sonarIssues.xml
|
||||||
|
|
||||||
|
# Markdown Navigator plugin
|
||||||
|
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
|
||||||
|
.idea/**/markdown-navigator.xml
|
||||||
|
.idea/**/markdown-navigator-enh.xml
|
||||||
|
.idea/**/markdown-navigator/
|
||||||
|
|
||||||
|
# Cache file creation bug
|
||||||
|
# See https://youtrack.jetbrains.com/issue/JBR-2257
|
||||||
|
.idea/$CACHE_FILE$
|
||||||
|
|
||||||
|
# CodeStream plugin
|
||||||
|
# https://plugins.jetbrains.com/plugin/12206-codestream
|
||||||
|
.idea/codestream.xml
|
||||||
|
|
||||||
|
# End of https://www.toptal.com/developers/gitignore/api/autotools,cmake,phpstorm
|
||||||
|
|
||||||
|
.deps
|
||||||
|
.libs/
|
||||||
|
build/
|
||||||
|
configure.in
|
||||||
|
configure.ac
|
||||||
|
mkinstalldirs
|
||||||
|
run-tests.php
|
||||||
|
Makefile.global
|
||||||
|
acinclude.m4
|
||||||
|
libtool
|
||||||
|
modules/
|
||||||
|
*.lo
|
||||||
|
config.h
|
||||||
|
config.nice
|
||||||
|
*.la
|
||||||
|
Makefile*
|
||||||
|
!Makefile.am
|
||||||
|
!Makefile.frag
|
||||||
|
!Makefile.frag.w32
|
||||||
|
/vendor/
|
||||||
|
.idea/
|
||||||
|
.DS_Store
|
||||||
|
composer.lock
|
||||||
|
PHP-Parser*/
|
||||||
|
src/*.so
|
||||||
|
src/*.dylib
|
||||||
|
src/*.dll
|
||||||
|
|
||||||
|
# ignoring output of package.xml as it needs to be generated from ./prepare_release.sh in each publishing
|
||||||
|
package.xml
|
||||||
|
*.tgz
|
3
vendor/aws/aws-crt-php/.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "crt/aws-crt-ffi"]
|
||||||
|
path = crt/aws-crt-ffi
|
||||||
|
url = https://github.com/awslabs/aws-crt-ffi.git
|
2
vendor/aws/aws-crt-php/ext/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*.so
|
||||||
|
api.h
|
3
vendor/aws/aws-crt-php/src/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
api.h
|
||||||
|
pkgconfig/
|
||||||
|
*.so*
|
5
vendor/cboden/ratchet/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
phpunit.xml
|
||||||
|
reports
|
||||||
|
sandbox
|
||||||
|
vendor
|
||||||
|
composer.lock
|
4
vendor/composer/InstalledVersions.php
vendored
|
@ -30,7 +30,7 @@ private static $installed = array (
|
||||||
'aliases' =>
|
'aliases' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
'reference' => '8728c0672ecc29aefb1305aeb413ed24210ee1ef',
|
'reference' => '16534d421740808ba107fd068052561ae69afd08',
|
||||||
'name' => 'wwbn/avideo',
|
'name' => 'wwbn/avideo',
|
||||||
),
|
),
|
||||||
'versions' =>
|
'versions' =>
|
||||||
|
@ -692,7 +692,7 @@ private static $installed = array (
|
||||||
'aliases' =>
|
'aliases' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
'reference' => '8728c0672ecc29aefb1305aeb413ed24210ee1ef',
|
'reference' => '16534d421740808ba107fd068052561ae69afd08',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
8
vendor/composer/autoload_files.php
vendored
|
@ -9,17 +9,17 @@ return array(
|
||||||
'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php',
|
'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php',
|
||||||
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
|
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
|
||||||
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
|
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
|
||||||
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
|
|
||||||
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
|
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
|
||||||
|
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
|
||||||
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
|
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
|
||||||
'972fda704d680a3a53c68e34e193cb22' => $vendorDir . '/react/promise-timer/src/functions_include.php',
|
|
||||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
|
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||||
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
|
'972fda704d680a3a53c68e34e193cb22' => $vendorDir . '/react/promise-timer/src/functions_include.php',
|
||||||
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
|
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
|
||||||
|
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
|
||||||
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
|
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
|
||||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
|
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||||
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
|
|
||||||
'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
|
'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
|
||||||
|
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
|
||||||
'b067bc7112e384b61c701452d53a14a8' => $vendorDir . '/mtdowling/jmespath.php/src/JmesPath.php',
|
'b067bc7112e384b61c701452d53a14a8' => $vendorDir . '/mtdowling/jmespath.php/src/JmesPath.php',
|
||||||
'8a9dc1de0ca7e01f3e08231539562f61' => $vendorDir . '/aws/aws-sdk-php/src/functions.php',
|
'8a9dc1de0ca7e01f3e08231539562f61' => $vendorDir . '/aws/aws-sdk-php/src/functions.php',
|
||||||
'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php',
|
'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php',
|
||||||
|
|
2
vendor/composer/autoload_psr4.php
vendored
|
@ -34,7 +34,7 @@ return array(
|
||||||
'Ratchet\\Client\\' => array($vendorDir . '/ratchet/pawl/src'),
|
'Ratchet\\Client\\' => array($vendorDir . '/ratchet/pawl/src'),
|
||||||
'Ratchet\\' => array($vendorDir . '/cboden/ratchet/src/Ratchet'),
|
'Ratchet\\' => array($vendorDir . '/cboden/ratchet/src/Ratchet'),
|
||||||
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
||||||
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
|
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src', $vendorDir . '/psr/http-factory/src'),
|
||||||
'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
|
'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
|
||||||
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
|
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
|
||||||
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
|
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
|
||||||
|
|
14
vendor/composer/autoload_real.php
vendored
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
// autoload_real.php @generated by Composer
|
// autoload_real.php @generated by Composer
|
||||||
|
|
||||||
class ComposerAutoloaderInit51528b4a875f8e0aa6970f42ad88c832
|
class ComposerAutoloaderInit4eca095a43f7c8c6d8c0f7669b7856c7
|
||||||
{
|
{
|
||||||
private static $loader;
|
private static $loader;
|
||||||
|
|
||||||
|
@ -22,15 +22,15 @@ class ComposerAutoloaderInit51528b4a875f8e0aa6970f42ad88c832
|
||||||
return self::$loader;
|
return self::$loader;
|
||||||
}
|
}
|
||||||
|
|
||||||
spl_autoload_register(array('ComposerAutoloaderInit51528b4a875f8e0aa6970f42ad88c832', 'loadClassLoader'), true, true);
|
spl_autoload_register(array('ComposerAutoloaderInit4eca095a43f7c8c6d8c0f7669b7856c7', 'loadClassLoader'), true, true);
|
||||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||||
spl_autoload_unregister(array('ComposerAutoloaderInit51528b4a875f8e0aa6970f42ad88c832', 'loadClassLoader'));
|
spl_autoload_unregister(array('ComposerAutoloaderInit4eca095a43f7c8c6d8c0f7669b7856c7', 'loadClassLoader'));
|
||||||
|
|
||||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||||
if ($useStaticLoader) {
|
if ($useStaticLoader) {
|
||||||
require __DIR__ . '/autoload_static.php';
|
require __DIR__ . '/autoload_static.php';
|
||||||
|
|
||||||
call_user_func(\Composer\Autoload\ComposerStaticInit51528b4a875f8e0aa6970f42ad88c832::getInitializer($loader));
|
call_user_func(\Composer\Autoload\ComposerStaticInit4eca095a43f7c8c6d8c0f7669b7856c7::getInitializer($loader));
|
||||||
} else {
|
} else {
|
||||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||||
foreach ($map as $namespace => $path) {
|
foreach ($map as $namespace => $path) {
|
||||||
|
@ -51,19 +51,19 @@ class ComposerAutoloaderInit51528b4a875f8e0aa6970f42ad88c832
|
||||||
$loader->register(true);
|
$loader->register(true);
|
||||||
|
|
||||||
if ($useStaticLoader) {
|
if ($useStaticLoader) {
|
||||||
$includeFiles = Composer\Autoload\ComposerStaticInit51528b4a875f8e0aa6970f42ad88c832::$files;
|
$includeFiles = Composer\Autoload\ComposerStaticInit4eca095a43f7c8c6d8c0f7669b7856c7::$files;
|
||||||
} else {
|
} else {
|
||||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||||
}
|
}
|
||||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||||
composerRequire51528b4a875f8e0aa6970f42ad88c832($fileIdentifier, $file);
|
composerRequire4eca095a43f7c8c6d8c0f7669b7856c7($fileIdentifier, $file);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $loader;
|
return $loader;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function composerRequire51528b4a875f8e0aa6970f42ad88c832($fileIdentifier, $file)
|
function composerRequire4eca095a43f7c8c6d8c0f7669b7856c7($fileIdentifier, $file)
|
||||||
{
|
{
|
||||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||||
require $file;
|
require $file;
|
||||||
|
|
22
vendor/composer/autoload_static.php
vendored
|
@ -4,23 +4,23 @@
|
||||||
|
|
||||||
namespace Composer\Autoload;
|
namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInit51528b4a875f8e0aa6970f42ad88c832
|
class ComposerStaticInit4eca095a43f7c8c6d8c0f7669b7856c7
|
||||||
{
|
{
|
||||||
public static $files = array (
|
public static $files = array (
|
||||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||||
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
||||||
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
||||||
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
|
||||||
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
|
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
|
||||||
|
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
||||||
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
|
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
|
||||||
'972fda704d680a3a53c68e34e193cb22' => __DIR__ . '/..' . '/react/promise-timer/src/functions_include.php',
|
|
||||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||||
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
|
'972fda704d680a3a53c68e34e193cb22' => __DIR__ . '/..' . '/react/promise-timer/src/functions_include.php',
|
||||||
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
|
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
|
||||||
|
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
|
||||||
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
|
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
|
||||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
|
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||||
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
|
|
||||||
'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
|
'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
|
||||||
|
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
|
||||||
'b067bc7112e384b61c701452d53a14a8' => __DIR__ . '/..' . '/mtdowling/jmespath.php/src/JmesPath.php',
|
'b067bc7112e384b61c701452d53a14a8' => __DIR__ . '/..' . '/mtdowling/jmespath.php/src/JmesPath.php',
|
||||||
'8a9dc1de0ca7e01f3e08231539562f61' => __DIR__ . '/..' . '/aws/aws-sdk-php/src/functions.php',
|
'8a9dc1de0ca7e01f3e08231539562f61' => __DIR__ . '/..' . '/aws/aws-sdk-php/src/functions.php',
|
||||||
'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php',
|
'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php',
|
||||||
|
@ -249,8 +249,8 @@ class ComposerStaticInit51528b4a875f8e0aa6970f42ad88c832
|
||||||
),
|
),
|
||||||
'Psr\\Http\\Message\\' =>
|
'Psr\\Http\\Message\\' =>
|
||||||
array (
|
array (
|
||||||
0 => __DIR__ . '/..' . '/psr/http-factory/src',
|
0 => __DIR__ . '/..' . '/psr/http-message/src',
|
||||||
1 => __DIR__ . '/..' . '/psr/http-message/src',
|
1 => __DIR__ . '/..' . '/psr/http-factory/src',
|
||||||
),
|
),
|
||||||
'Psr\\Http\\Client\\' =>
|
'Psr\\Http\\Client\\' =>
|
||||||
array (
|
array (
|
||||||
|
@ -578,10 +578,10 @@ class ComposerStaticInit51528b4a875f8e0aa6970f42ad88c832
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInit51528b4a875f8e0aa6970f42ad88c832::$prefixLengthsPsr4;
|
$loader->prefixLengthsPsr4 = ComposerStaticInit4eca095a43f7c8c6d8c0f7669b7856c7::$prefixLengthsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInit51528b4a875f8e0aa6970f42ad88c832::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInit4eca095a43f7c8c6d8c0f7669b7856c7::$prefixDirsPsr4;
|
||||||
$loader->prefixesPsr0 = ComposerStaticInit51528b4a875f8e0aa6970f42ad88c832::$prefixesPsr0;
|
$loader->prefixesPsr0 = ComposerStaticInit4eca095a43f7c8c6d8c0f7669b7856c7::$prefixesPsr0;
|
||||||
$loader->classMap = ComposerStaticInit51528b4a875f8e0aa6970f42ad88c832::$classMap;
|
$loader->classMap = ComposerStaticInit4eca095a43f7c8c6d8c0f7669b7856c7::$classMap;
|
||||||
|
|
||||||
}, null, ClassLoader::class);
|
}, null, ClassLoader::class);
|
||||||
}
|
}
|
||||||
|
|
130
vendor/composer/installed.json
vendored
|
@ -29,7 +29,7 @@
|
||||||
},
|
},
|
||||||
"time": "2020-09-22T14:27:00+00:00",
|
"time": "2020-09-22T14:27:00+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Abraham\\TwitterOAuth\\": "src"
|
"Abraham\\TwitterOAuth\\": "src"
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-09-03T22:57:30+00:00",
|
"time": "2021-09-03T22:57:30+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
"src/"
|
"src/"
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
"dev-master": "3.0-dev"
|
"dev-master": "3.0-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Aws\\": "src/"
|
"Aws\\": "src/"
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
},
|
},
|
||||||
"time": "2020-07-07T15:50:14+00:00",
|
"time": "2020-07-07T15:50:14+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Ratchet\\": "src/Ratchet"
|
"Ratchet\\": "src/Ratchet"
|
||||||
|
@ -297,7 +297,7 @@
|
||||||
},
|
},
|
||||||
"time": "2016-09-27T22:00:56+00:00",
|
"time": "2016-09-27T22:00:56+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
"class-php-ico.php"
|
"class-php-ico.php"
|
||||||
|
@ -359,7 +359,7 @@
|
||||||
"dev-main": "1.x-dev"
|
"dev-main": "1.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Composer\\CaBundle\\": "src"
|
"Composer\\CaBundle\\": "src"
|
||||||
|
@ -522,7 +522,7 @@
|
||||||
},
|
},
|
||||||
"time": "2017-07-23T21:35:13+00:00",
|
"time": "2017-07-23T21:35:13+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
"Evenement": "src"
|
"Evenement": "src"
|
||||||
|
@ -572,7 +572,7 @@
|
||||||
},
|
},
|
||||||
"time": "2020-06-29T00:56:53+00:00",
|
"time": "2020-06-29T00:56:53+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
"HTMLPurifier": "library/"
|
"HTMLPurifier": "library/"
|
||||||
|
@ -694,7 +694,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-02-05T03:39:02+00:00",
|
"time": "2021-02-05T03:39:02+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"BackblazeB2\\": "src/"
|
"BackblazeB2\\": "src/"
|
||||||
|
@ -776,7 +776,7 @@
|
||||||
"dev-master": "2.x-dev"
|
"dev-master": "2.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Google\\": "src/"
|
"Google\\": "src/"
|
||||||
|
@ -826,7 +826,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-11-05T14:29:41+00:00",
|
"time": "2021-11-05T14:29:41+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Google\\Service\\": "src"
|
"Google\\Service\\": "src"
|
||||||
|
@ -885,7 +885,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-08-24T18:03:18+00:00",
|
"time": "2021-08-24T18:03:18+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Google\\Auth\\": "src"
|
"Google\\Auth\\": "src"
|
||||||
|
@ -946,7 +946,7 @@
|
||||||
"dev-master": "6.5-dev"
|
"dev-master": "6.5-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"GuzzleHttp\\": "src/"
|
"GuzzleHttp\\": "src/"
|
||||||
|
@ -1011,7 +1011,7 @@
|
||||||
"dev-master": "1.5-dev"
|
"dev-master": "1.5-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"GuzzleHttp\\Promise\\": "src/"
|
"GuzzleHttp\\Promise\\": "src/"
|
||||||
|
@ -1107,7 +1107,7 @@
|
||||||
"dev-master": "1.7-dev"
|
"dev-master": "1.7-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"GuzzleHttp\\Psr7\\": "src/"
|
"GuzzleHttp\\Psr7\\": "src/"
|
||||||
|
@ -1211,7 +1211,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-03-13T17:35:33+00:00",
|
"time": "2021-03-13T17:35:33+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Hybridauth\\": "src/"
|
"Hybridauth\\": "src/"
|
||||||
|
@ -1293,7 +1293,7 @@
|
||||||
"dev-master": "1.9.x-dev"
|
"dev-master": "1.9.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
"getid3/"
|
"getid3/"
|
||||||
|
@ -1416,7 +1416,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-05-28T08:32:12+00:00",
|
"time": "2021-05-28T08:32:12+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Monolog\\": "src/Monolog"
|
"Monolog\\": "src/Monolog"
|
||||||
|
@ -1574,7 +1574,7 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Carbon\\": "src/Carbon/"
|
"Carbon\\": "src/Carbon/"
|
||||||
|
@ -1658,7 +1658,7 @@
|
||||||
"dev-master": "2.0-dev"
|
"dev-master": "2.0-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"OneSignal\\": "src/"
|
"OneSignal\\": "src/"
|
||||||
|
@ -1727,7 +1727,7 @@
|
||||||
"dev-master": "1.4-dev"
|
"dev-master": "1.4-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Nyholm\\Psr7\\": "src/"
|
"Nyholm\\Psr7\\": "src/"
|
||||||
|
@ -1792,7 +1792,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-09-21T20:57:38+00:00",
|
"time": "2021-09-21T20:57:38+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"PayPalCheckoutSdk\\": "lib/PayPalCheckoutSdk",
|
"PayPalCheckoutSdk\\": "lib/PayPalCheckoutSdk",
|
||||||
|
@ -1847,7 +1847,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-09-28T16:40:36+00:00",
|
"time": "2021-09-28T16:40:36+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"PaypalPayoutsSDK\\": "lib/PaypalPayoutsSDK",
|
"PaypalPayoutsSDK\\": "lib/PaypalPayoutsSDK",
|
||||||
|
@ -1902,7 +1902,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-09-14T21:35:26+00:00",
|
"time": "2021-09-14T21:35:26+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"PayPalHttp\\": "lib/PayPalHttp"
|
"PayPalHttp\\": "lib/PayPalHttp"
|
||||||
|
@ -2007,7 +2007,7 @@
|
||||||
"dev-master": "1.0-dev"
|
"dev-master": "1.0-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Http\\Message\\": "src/"
|
"Http\\Message\\": "src/"
|
||||||
|
@ -2079,7 +2079,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-08-18T09:14:16+00:00",
|
"time": "2021-08-18T09:14:16+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"PHPMailer\\PHPMailer\\": "src/"
|
"PHPMailer\\PHPMailer\\": "src/"
|
||||||
|
@ -2150,7 +2150,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-10-27T02:46:30+00:00",
|
"time": "2021-10-27T02:46:30+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
"phpseclib/bootstrap.php"
|
"phpseclib/bootstrap.php"
|
||||||
|
@ -2256,7 +2256,7 @@
|
||||||
"dev-master": "1.0.x-dev"
|
"dev-master": "1.0.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Psr\\Cache\\": "src/"
|
"Psr\\Cache\\": "src/"
|
||||||
|
@ -2299,11 +2299,11 @@
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.3"
|
"php": ">=7.2.0"
|
||||||
},
|
},
|
||||||
"time": "2021-03-05T17:36:06+00:00",
|
"time": "2021-03-05T17:36:06+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Psr\\Container\\": "src/"
|
"Psr\\Container\\": "src/"
|
||||||
|
@ -2360,7 +2360,7 @@
|
||||||
"dev-master": "1.0.x-dev"
|
"dev-master": "1.0.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Psr\\Http\\Client\\": "src/"
|
"Psr\\Http\\Client\\": "src/"
|
||||||
|
@ -2415,7 +2415,7 @@
|
||||||
"dev-master": "1.0.x-dev"
|
"dev-master": "1.0.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Psr\\Http\\Message\\": "src/"
|
"Psr\\Http\\Message\\": "src/"
|
||||||
|
@ -2472,7 +2472,7 @@
|
||||||
"dev-master": "1.0.x-dev"
|
"dev-master": "1.0.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Psr\\Http\\Message\\": "src/"
|
"Psr\\Http\\Message\\": "src/"
|
||||||
|
@ -2580,7 +2580,7 @@
|
||||||
},
|
},
|
||||||
"time": "2019-03-08T08:55:37+00:00",
|
"time": "2019-03-08T08:55:37+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
"src/getallheaders.php"
|
"src/getallheaders.php"
|
||||||
|
@ -2632,7 +2632,7 @@
|
||||||
},
|
},
|
||||||
"time": "2020-07-17T15:32:47+00:00",
|
"time": "2020-07-17T15:32:47+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Ratchet\\Client\\": "src"
|
"Ratchet\\Client\\": "src"
|
||||||
|
@ -2684,7 +2684,7 @@
|
||||||
},
|
},
|
||||||
"time": "2020-05-15T18:31:24+00:00",
|
"time": "2020-05-15T18:31:24+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Ratchet\\RFC6455\\": "src"
|
"Ratchet\\RFC6455\\": "src"
|
||||||
|
@ -2743,7 +2743,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-02-02T06:47:52+00:00",
|
"time": "2021-02-02T06:47:52+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"React\\Cache\\": "src/"
|
"React\\Cache\\": "src/"
|
||||||
|
@ -2826,7 +2826,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-07-11T12:40:34+00:00",
|
"time": "2021-07-11T12:40:34+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"React\\Dns\\": "src"
|
"React\\Dns\\": "src"
|
||||||
|
@ -2909,7 +2909,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-07-11T12:31:24+00:00",
|
"time": "2021-07-11T12:31:24+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"React\\EventLoop\\": "src"
|
"React\\EventLoop\\": "src"
|
||||||
|
@ -2985,7 +2985,7 @@
|
||||||
},
|
},
|
||||||
"time": "2020-05-12T15:16:56+00:00",
|
"time": "2020-05-12T15:16:56+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"React\\Promise\\": "src/"
|
"React\\Promise\\": "src/"
|
||||||
|
@ -3040,7 +3040,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-07-11T13:08:51+00:00",
|
"time": "2021-07-11T13:08:51+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"React\\Promise\\Timer\\": "src/"
|
"React\\Promise\\Timer\\": "src/"
|
||||||
|
@ -3132,7 +3132,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-08-03T12:37:06+00:00",
|
"time": "2021-08-03T12:37:06+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"React\\Socket\\": "src"
|
"React\\Socket\\": "src"
|
||||||
|
@ -3214,7 +3214,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-07-11T12:37:55+00:00",
|
"time": "2021-07-11T12:37:55+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"React\\Stream\\": "src"
|
"React\\Stream\\": "src"
|
||||||
|
@ -3300,7 +3300,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-05-26T00:35:20+00:00",
|
"time": "2021-05-26T00:35:20+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
"lib/"
|
"lib/"
|
||||||
|
@ -3376,7 +3376,7 @@
|
||||||
"dev-master": "2.0-dev"
|
"dev-master": "2.0-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Stripe\\": "lib/"
|
"Stripe\\": "lib/"
|
||||||
|
@ -3434,7 +3434,7 @@
|
||||||
"url": "https://github.com/symfony/contracts"
|
"url": "https://github.com/symfony/contracts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
"function.php"
|
"function.php"
|
||||||
|
@ -3521,7 +3521,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-10-19T08:32:53+00:00",
|
"time": "2021-10-19T08:32:53+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\HttpClient\\": ""
|
"Symfony\\Component\\HttpClient\\": ""
|
||||||
|
@ -3581,7 +3581,7 @@
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.3"
|
"php": ">=7.2.5"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/http-client-implementation": ""
|
"symfony/http-client-implementation": ""
|
||||||
|
@ -3597,7 +3597,7 @@
|
||||||
"url": "https://github.com/symfony/contracts"
|
"url": "https://github.com/symfony/contracts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Contracts\\HttpClient\\": ""
|
"Symfony\\Contracts\\HttpClient\\": ""
|
||||||
|
@ -3678,7 +3678,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-10-11T15:41:55+00:00",
|
"time": "2021-10-11T15:41:55+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\HttpFoundation\\": ""
|
"Symfony\\Component\\HttpFoundation\\": ""
|
||||||
|
@ -3738,14 +3738,14 @@
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.3",
|
"php": ">=7.2.5",
|
||||||
"symfony/deprecation-contracts": "^2.1",
|
"symfony/deprecation-contracts": "^2.1",
|
||||||
"symfony/polyfill-php73": "~1.0",
|
"symfony/polyfill-php73": "~1.0",
|
||||||
"symfony/polyfill-php80": "^1.16"
|
"symfony/polyfill-php80": "^1.16"
|
||||||
},
|
},
|
||||||
"time": "2021-08-04T21:20:46+00:00",
|
"time": "2021-08-04T21:20:46+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\OptionsResolver\\": ""
|
"Symfony\\Component\\OptionsResolver\\": ""
|
||||||
|
@ -3828,7 +3828,7 @@
|
||||||
"url": "https://github.com/symfony/polyfill"
|
"url": "https://github.com/symfony/polyfill"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Polyfill\\Intl\\Idn\\": ""
|
"Symfony\\Polyfill\\Intl\\Idn\\": ""
|
||||||
|
@ -3916,7 +3916,7 @@
|
||||||
"url": "https://github.com/symfony/polyfill"
|
"url": "https://github.com/symfony/polyfill"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
|
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
|
||||||
|
@ -4003,7 +4003,7 @@
|
||||||
"url": "https://github.com/symfony/polyfill"
|
"url": "https://github.com/symfony/polyfill"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Polyfill\\Mbstring\\": ""
|
"Symfony\\Polyfill\\Mbstring\\": ""
|
||||||
|
@ -4083,7 +4083,7 @@
|
||||||
"url": "https://github.com/symfony/polyfill"
|
"url": "https://github.com/symfony/polyfill"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Polyfill\\Php72\\": ""
|
"Symfony\\Polyfill\\Php72\\": ""
|
||||||
|
@ -4162,7 +4162,7 @@
|
||||||
"url": "https://github.com/symfony/polyfill"
|
"url": "https://github.com/symfony/polyfill"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Polyfill\\Php73\\": ""
|
"Symfony\\Polyfill\\Php73\\": ""
|
||||||
|
@ -4244,7 +4244,7 @@
|
||||||
"url": "https://github.com/symfony/polyfill"
|
"url": "https://github.com/symfony/polyfill"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Polyfill\\Php80\\": ""
|
"Symfony\\Polyfill\\Php80\\": ""
|
||||||
|
@ -4317,7 +4317,7 @@
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.3",
|
"php": ">=7.2.5",
|
||||||
"symfony/deprecation-contracts": "^2.1",
|
"symfony/deprecation-contracts": "^2.1",
|
||||||
"symfony/polyfill-php80": "^1.16"
|
"symfony/polyfill-php80": "^1.16"
|
||||||
},
|
},
|
||||||
|
@ -4344,7 +4344,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-08-04T21:42:42+00:00",
|
"time": "2021-08-04T21:42:42+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\Routing\\": ""
|
"Symfony\\Component\\Routing\\": ""
|
||||||
|
@ -4410,7 +4410,7 @@
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.3",
|
"php": ">=7.2.5",
|
||||||
"psr/container": "^1.1"
|
"psr/container": "^1.1"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
|
@ -4427,7 +4427,7 @@
|
||||||
"url": "https://github.com/symfony/contracts"
|
"url": "https://github.com/symfony/contracts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Contracts\\Service\\": ""
|
"Symfony\\Contracts\\Service\\": ""
|
||||||
|
@ -4527,7 +4527,7 @@
|
||||||
},
|
},
|
||||||
"time": "2021-10-10T06:43:24+00:00",
|
"time": "2021-10-10T06:43:24+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
"Resources/functions.php"
|
"Resources/functions.php"
|
||||||
|
@ -4590,7 +4590,7 @@
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.3"
|
"php": ">=7.2.5"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/translation-implementation": ""
|
"symfony/translation-implementation": ""
|
||||||
|
@ -4606,7 +4606,7 @@
|
||||||
"url": "https://github.com/symfony/contracts"
|
"url": "https://github.com/symfony/contracts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "source",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Contracts\\Translation\\": ""
|
"Symfony\\Contracts\\Translation\\": ""
|
||||||
|
|
4
vendor/composer/installed.php
vendored
|
@ -6,7 +6,7 @@
|
||||||
'aliases' =>
|
'aliases' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
'reference' => '8728c0672ecc29aefb1305aeb413ed24210ee1ef',
|
'reference' => '16534d421740808ba107fd068052561ae69afd08',
|
||||||
'name' => 'wwbn/avideo',
|
'name' => 'wwbn/avideo',
|
||||||
),
|
),
|
||||||
'versions' =>
|
'versions' =>
|
||||||
|
@ -668,7 +668,7 @@
|
||||||
'aliases' =>
|
'aliases' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
'reference' => '8728c0672ecc29aefb1305aeb413ed24210ee1ef',
|
'reference' => '16534d421740808ba107fd068052561ae69afd08',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
1
vendor/emojione/assets/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
.idea
|
16
vendor/emojione/emojione/.gitignore
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
.DS_Store
|
||||||
|
.idea
|
||||||
|
.idea/
|
||||||
|
/.idea/
|
||||||
|
node_modules/
|
||||||
|
/node_modules/
|
||||||
|
node_modules
|
||||||
|
.sass-cache
|
||||||
|
lib/js/tests.html
|
||||||
|
*.pyc
|
||||||
|
.tox/
|
||||||
|
build/
|
||||||
|
emojipy-*/
|
||||||
|
emojipy.egg-info/
|
||||||
|
npm-debug.log
|
||||||
|
lib/js/tests/npm-debug.log
|
1
vendor/emojione/emojione/lib/android/generator/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
1
vendor/emojione/emojione/lib/ios/generator/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
1
vendor/emojione/emojione/lib/swift/generator/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
2
vendor/evenement/evenement/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
composer.lock
|
||||||
|
vendor
|
19
vendor/ezyang/htmlpurifier/.travis.yml
vendored
|
@ -1,19 +0,0 @@
|
||||||
language: php
|
|
||||||
php:
|
|
||||||
- '5.6'
|
|
||||||
- '7.0'
|
|
||||||
- '7.1'
|
|
||||||
- '7.2'
|
|
||||||
- '7.3'
|
|
||||||
- '7.4'
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- php: '5.4'
|
|
||||||
dist: trusty
|
|
||||||
- php: '5.5'
|
|
||||||
dist: trusty
|
|
||||||
before_script:
|
|
||||||
- git clone --depth=50 https://github.com/ezyang/simpletest.git
|
|
||||||
- cp test-settings.travis.php test-settings.php
|
|
||||||
script:
|
|
||||||
- php tests/index.php
|
|
1317
vendor/ezyang/htmlpurifier/Doxyfile
vendored
341
vendor/ezyang/htmlpurifier/INSTALL
vendored
|
@ -1,341 +0,0 @@
|
||||||
|
|
||||||
Install
|
|
||||||
How to install HTML Purifier
|
|
||||||
|
|
||||||
HTML Purifier is designed to run out of the box, so actually using the
|
|
||||||
library is extremely easy. (Although... if you were looking for a
|
|
||||||
step-by-step installation GUI, you've downloaded the wrong software!)
|
|
||||||
|
|
||||||
While the impatient can get going immediately with some of the sample
|
|
||||||
code at the bottom of this library, it's well worth reading this entire
|
|
||||||
document--most of the other documentation assumes that you are familiar
|
|
||||||
with these contents.
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
1. Compatibility
|
|
||||||
|
|
||||||
HTML Purifier is PHP 5 and PHP 7, and is actively tested from PHP 5.3
|
|
||||||
and up. It has no core dependencies with other libraries.
|
|
||||||
|
|
||||||
These optional extensions can enhance the capabilities of HTML Purifier:
|
|
||||||
|
|
||||||
* iconv : Converts text to and from non-UTF-8 encodings
|
|
||||||
* bcmath : Used for unit conversion and imagecrash protection
|
|
||||||
* tidy : Used for pretty-printing HTML
|
|
||||||
|
|
||||||
These optional libraries can enhance the capabilities of HTML Purifier:
|
|
||||||
|
|
||||||
* CSSTidy : Clean CSS stylesheets using %Core.ExtractStyleBlocks
|
|
||||||
Note: You should use the modernized fork of CSSTidy available
|
|
||||||
at https://github.com/Cerdic/CSSTidy
|
|
||||||
* Net_IDNA2 (PEAR) : IRI support using %Core.EnableIDNA
|
|
||||||
Note: This is not necessary for PHP 5.3 or later
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
2. Reconnaissance
|
|
||||||
|
|
||||||
A big plus of HTML Purifier is its inerrant support of standards, so
|
|
||||||
your web-pages should be standards-compliant. (They should also use
|
|
||||||
semantic markup, but that's another issue altogether, one HTML Purifier
|
|
||||||
cannot fix without reading your mind.)
|
|
||||||
|
|
||||||
HTML Purifier can process these doctypes:
|
|
||||||
|
|
||||||
* XHTML 1.0 Transitional (default)
|
|
||||||
* XHTML 1.0 Strict
|
|
||||||
* HTML 4.01 Transitional
|
|
||||||
* HTML 4.01 Strict
|
|
||||||
* XHTML 1.1
|
|
||||||
|
|
||||||
...and these character encodings:
|
|
||||||
|
|
||||||
* UTF-8 (default)
|
|
||||||
* Any encoding iconv supports (with crippled internationalization support)
|
|
||||||
|
|
||||||
These defaults reflect what my choices would be if I were authoring an
|
|
||||||
HTML document, however, what you choose depends on the nature of your
|
|
||||||
codebase. If you don't know what doctype you are using, you can determine
|
|
||||||
the doctype from this identifier at the top of your source code:
|
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
|
|
||||||
...and the character encoding from this code:
|
|
||||||
|
|
||||||
<meta http-equiv="Content-type" content="text/html;charset=ENCODING">
|
|
||||||
|
|
||||||
If the character encoding declaration is missing, STOP NOW, and
|
|
||||||
read 'docs/enduser-utf8.html' (web accessible at
|
|
||||||
http://htmlpurifier.org/docs/enduser-utf8.html). In fact, even if it is
|
|
||||||
present, read this document anyway, as many websites specify their
|
|
||||||
document's character encoding incorrectly.
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
3. Including the library
|
|
||||||
|
|
||||||
The procedure is quite simple:
|
|
||||||
|
|
||||||
require_once '/path/to/library/HTMLPurifier.auto.php';
|
|
||||||
|
|
||||||
This will setup an autoloader, so the library's files are only included
|
|
||||||
when you use them.
|
|
||||||
|
|
||||||
Only the contents in the library/ folder are necessary, so you can remove
|
|
||||||
everything else when using HTML Purifier in a production environment.
|
|
||||||
|
|
||||||
If you installed HTML Purifier via PEAR, all you need to do is:
|
|
||||||
|
|
||||||
require_once 'HTMLPurifier.auto.php';
|
|
||||||
|
|
||||||
Please note that the usual PEAR practice of including just the classes you
|
|
||||||
want will not work with HTML Purifier's autoloading scheme.
|
|
||||||
|
|
||||||
Advanced users, read on; other users can skip to section 4.
|
|
||||||
|
|
||||||
Autoload compatibility
|
|
||||||
----------------------
|
|
||||||
|
|
||||||
HTML Purifier attempts to be as smart as possible when registering an
|
|
||||||
autoloader, but there are some cases where you will need to change
|
|
||||||
your own code to accomodate HTML Purifier. These are those cases:
|
|
||||||
|
|
||||||
AN __autoload FUNCTION IS DECLARED AFTER OUR AUTOLOADER IS REGISTERED
|
|
||||||
spl_autoload_register() has the curious behavior of disabling
|
|
||||||
the existing __autoload() handler. Users need to explicitly
|
|
||||||
spl_autoload_register('__autoload'). Because we use SPL when it
|
|
||||||
is available, __autoload() will ALWAYS be disabled. If __autoload()
|
|
||||||
is declared before HTML Purifier is loaded, this is not a problem:
|
|
||||||
HTML Purifier will register the function for you. But if it is
|
|
||||||
declared afterwards, it will mysteriously not work. This
|
|
||||||
snippet of code (after your autoloader is defined) will fix it:
|
|
||||||
|
|
||||||
spl_autoload_register('__autoload')
|
|
||||||
|
|
||||||
|
|
||||||
For better performance
|
|
||||||
----------------------
|
|
||||||
|
|
||||||
Opcode caches, which greatly speed up PHP initialization for scripts
|
|
||||||
with large amounts of code (HTML Purifier included), don't like
|
|
||||||
autoloaders. We offer an include file that includes all of HTML Purifier's
|
|
||||||
files in one go in an opcode cache friendly manner:
|
|
||||||
|
|
||||||
// If /path/to/library isn't already in your include path, uncomment
|
|
||||||
// the below line:
|
|
||||||
// require '/path/to/library/HTMLPurifier.path.php';
|
|
||||||
|
|
||||||
require 'HTMLPurifier.includes.php';
|
|
||||||
|
|
||||||
Optional components still need to be included--you'll know if you try to
|
|
||||||
use a feature and you get a class doesn't exists error! The autoloader
|
|
||||||
can be used in conjunction with this approach to catch classes that are
|
|
||||||
missing. Simply add this afterwards:
|
|
||||||
|
|
||||||
require 'HTMLPurifier.autoload.php';
|
|
||||||
|
|
||||||
Standalone version
|
|
||||||
------------------
|
|
||||||
|
|
||||||
HTML Purifier has a standalone distribution; you can also generate
|
|
||||||
a standalone file from the full version by running the script
|
|
||||||
maintenance/generate-standalone.php . The standalone version has the
|
|
||||||
benefit of having most of its code in one file, so parsing is much
|
|
||||||
faster and the library is easier to manage.
|
|
||||||
|
|
||||||
If HTMLPurifier.standalone.php exists in the library directory, you
|
|
||||||
can use it like this:
|
|
||||||
|
|
||||||
require '/path/to/HTMLPurifier.standalone.php';
|
|
||||||
|
|
||||||
This is equivalent to including HTMLPurifier.includes.php, except that
|
|
||||||
the contents of standalone/ will be added to your path. To override this
|
|
||||||
behavior, specify a new HTMLPURIFIER_PREFIX where standalone files can
|
|
||||||
be found (usually, this will be one directory up, the "true" library
|
|
||||||
directory in full distributions). Don't forget to set your path too!
|
|
||||||
|
|
||||||
The autoloader can be added to the end to ensure the classes are
|
|
||||||
loaded when necessary; otherwise you can manually include them.
|
|
||||||
To use the autoloader, use this:
|
|
||||||
|
|
||||||
require 'HTMLPurifier.autoload.php';
|
|
||||||
|
|
||||||
For advanced users
|
|
||||||
------------------
|
|
||||||
|
|
||||||
HTMLPurifier.auto.php performs a number of operations that can be done
|
|
||||||
individually. These are:
|
|
||||||
|
|
||||||
HTMLPurifier.path.php
|
|
||||||
Puts /path/to/library in the include path. For high performance,
|
|
||||||
this should be done in php.ini.
|
|
||||||
|
|
||||||
HTMLPurifier.autoload.php
|
|
||||||
Registers our autoload handler HTMLPurifier_Bootstrap::autoload($class).
|
|
||||||
|
|
||||||
You can do these operations by yourself, if you like.
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
4. Configuration
|
|
||||||
|
|
||||||
HTML Purifier is designed to run out-of-the-box, but occasionally HTML
|
|
||||||
Purifier needs to be told what to do. If you answer no to any of these
|
|
||||||
questions, read on; otherwise, you can skip to the next section (or, if you're
|
|
||||||
into configuring things just for the heck of it, skip to 4.3).
|
|
||||||
|
|
||||||
* Am I using UTF-8?
|
|
||||||
* Am I using XHTML 1.0 Transitional?
|
|
||||||
|
|
||||||
If you answered no to any of these questions, instantiate a configuration
|
|
||||||
object and read on:
|
|
||||||
|
|
||||||
$config = HTMLPurifier_Config::createDefault();
|
|
||||||
|
|
||||||
|
|
||||||
4.1. Setting a different character encoding
|
|
||||||
|
|
||||||
You really shouldn't use any other encoding except UTF-8, especially if you
|
|
||||||
plan to support multilingual websites (read section three for more details).
|
|
||||||
However, switching to UTF-8 is not always immediately feasible, so we can
|
|
||||||
adapt.
|
|
||||||
|
|
||||||
HTML Purifier uses iconv to support other character encodings, as such,
|
|
||||||
any encoding that iconv supports <http://www.gnu.org/software/libiconv/>
|
|
||||||
HTML Purifier supports with this code:
|
|
||||||
|
|
||||||
$config->set('Core.Encoding', /* put your encoding here */);
|
|
||||||
|
|
||||||
An example usage for Latin-1 websites (the most common encoding for English
|
|
||||||
websites):
|
|
||||||
|
|
||||||
$config->set('Core.Encoding', 'ISO-8859-1');
|
|
||||||
|
|
||||||
Note that HTML Purifier's support for non-Unicode encodings is crippled by the
|
|
||||||
fact that any character not supported by that encoding will be silently
|
|
||||||
dropped, EVEN if it is ampersand escaped. If you want to work around
|
|
||||||
this, you are welcome to read docs/enduser-utf8.html for a fix,
|
|
||||||
but please be cognizant of the issues the "solution" creates (for this
|
|
||||||
reason, I do not include the solution in this document).
|
|
||||||
|
|
||||||
|
|
||||||
4.2. Setting a different doctype
|
|
||||||
|
|
||||||
For those of you using HTML 4.01 Transitional, you can disable
|
|
||||||
XHTML output like this:
|
|
||||||
|
|
||||||
$config->set('HTML.Doctype', 'HTML 4.01 Transitional');
|
|
||||||
|
|
||||||
Other supported doctypes include:
|
|
||||||
|
|
||||||
* HTML 4.01 Strict
|
|
||||||
* HTML 4.01 Transitional
|
|
||||||
* XHTML 1.0 Strict
|
|
||||||
* XHTML 1.0 Transitional
|
|
||||||
* XHTML 1.1
|
|
||||||
|
|
||||||
|
|
||||||
4.3. Other settings
|
|
||||||
|
|
||||||
There are more configuration directives which can be read about
|
|
||||||
here: <http://htmlpurifier.org/live/configdoc/plain.html> They're a bit boring,
|
|
||||||
but they can help out for those of you who like to exert maximum control over
|
|
||||||
your code. Some of the more interesting ones are configurable at the
|
|
||||||
demo <http://htmlpurifier.org/demo.php> and are well worth looking into
|
|
||||||
for your own system.
|
|
||||||
|
|
||||||
For example, you can fine tune allowed elements and attributes, convert
|
|
||||||
relative URLs to absolute ones, and even autoparagraph input text! These
|
|
||||||
are, respectively, %HTML.Allowed, %URI.MakeAbsolute and %URI.Base, and
|
|
||||||
%AutoFormat.AutoParagraph. The %Namespace.Directive naming convention
|
|
||||||
translates to:
|
|
||||||
|
|
||||||
$config->set('Namespace.Directive', $value);
|
|
||||||
|
|
||||||
E.g.
|
|
||||||
|
|
||||||
$config->set('HTML.Allowed', 'p,b,a[href],i');
|
|
||||||
$config->set('URI.Base', 'http://www.example.com');
|
|
||||||
$config->set('URI.MakeAbsolute', true);
|
|
||||||
$config->set('AutoFormat.AutoParagraph', true);
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
5. Caching
|
|
||||||
|
|
||||||
HTML Purifier generates some cache files (generally one or two) to speed up
|
|
||||||
its execution. For maximum performance, make sure that
|
|
||||||
library/HTMLPurifier/DefinitionCache/Serializer is writeable by the webserver.
|
|
||||||
|
|
||||||
If you are in the library/ folder of HTML Purifier, you can set the
|
|
||||||
appropriate permissions using:
|
|
||||||
|
|
||||||
chmod -R 0755 HTMLPurifier/DefinitionCache/Serializer
|
|
||||||
|
|
||||||
If the above command doesn't work, you may need to assign write permissions
|
|
||||||
to group:
|
|
||||||
|
|
||||||
chmod -R 0775 HTMLPurifier/DefinitionCache/Serializer
|
|
||||||
|
|
||||||
You can also chmod files via your FTP client; this option
|
|
||||||
is usually accessible by right clicking the corresponding directory and
|
|
||||||
then selecting "chmod" or "file permissions".
|
|
||||||
|
|
||||||
Starting with 2.0.1, HTML Purifier will generate friendly error messages
|
|
||||||
that will tell you exactly what you have to chmod the directory to, if in doubt,
|
|
||||||
follow its advice.
|
|
||||||
|
|
||||||
If you are unable or unwilling to give write permissions to the cache
|
|
||||||
directory, you can either disable the cache (and suffer a performance
|
|
||||||
hit):
|
|
||||||
|
|
||||||
$config->set('Core.DefinitionCache', null);
|
|
||||||
|
|
||||||
Or move the cache directory somewhere else (no trailing slash):
|
|
||||||
|
|
||||||
$config->set('Cache.SerializerPath', '/home/user/absolute/path');
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
6. Using the code
|
|
||||||
|
|
||||||
The interface is mind-numbingly simple:
|
|
||||||
|
|
||||||
$purifier = new HTMLPurifier($config);
|
|
||||||
$clean_html = $purifier->purify( $dirty_html );
|
|
||||||
|
|
||||||
That's it! For more examples, check out docs/examples/ (they aren't very
|
|
||||||
different though). Also, docs/enduser-slow.html gives advice on what to
|
|
||||||
do if HTML Purifier is slowing down your application.
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
7. Quick install
|
|
||||||
|
|
||||||
First, make sure library/HTMLPurifier/DefinitionCache/Serializer is
|
|
||||||
writable by the webserver (see Section 5: Caching above for details).
|
|
||||||
If your website is in UTF-8 and XHTML Transitional, use this code:
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once '/path/to/htmlpurifier/library/HTMLPurifier.auto.php';
|
|
||||||
|
|
||||||
$config = HTMLPurifier_Config::createDefault();
|
|
||||||
$purifier = new HTMLPurifier($config);
|
|
||||||
$clean_html = $purifier->purify($dirty_html);
|
|
||||||
?>
|
|
||||||
|
|
||||||
If your website is in a different encoding or doctype, use this code:
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once '/path/to/htmlpurifier/library/HTMLPurifier.auto.php';
|
|
||||||
|
|
||||||
$config = HTMLPurifier_Config::createDefault();
|
|
||||||
$config->set('Core.Encoding', 'ISO-8859-1'); // replace with your encoding
|
|
||||||
$config->set('HTML.Doctype', 'HTML 4.01 Transitional'); // replace with your doctype
|
|
||||||
$purifier = new HTMLPurifier($config);
|
|
||||||
|
|
||||||
$clean_html = $purifier->purify($dirty_html);
|
|
||||||
?>
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
60
vendor/ezyang/htmlpurifier/INSTALL.fr.utf8
vendored
|
@ -1,60 +0,0 @@
|
||||||
|
|
||||||
Installation
|
|
||||||
Comment installer HTML Purifier
|
|
||||||
|
|
||||||
Attention : Ce document est encodé en UTF-8, si les lettres avec des accents
|
|
||||||
ne s'affichent pas, prenez un meilleur éditeur de texte.
|
|
||||||
|
|
||||||
L'installation de HTML Purifier est très simple, parce qu'il n'a pas besoin
|
|
||||||
de configuration. Pour les utilisateurs impatients, le code se trouve dans le
|
|
||||||
pied de page, mais je recommande de lire le document.
|
|
||||||
|
|
||||||
1. Compatibilité
|
|
||||||
|
|
||||||
HTML Purifier fonctionne avec PHP 5. PHP 5.3 est la dernière version testée.
|
|
||||||
Il ne dépend pas d'autres librairies.
|
|
||||||
|
|
||||||
Les extensions optionnelles sont iconv (généralement déjà installée) et tidy
|
|
||||||
(répendue aussi). Si vous utilisez UTF-8 et que vous ne voulez pas l'indentation,
|
|
||||||
vous pouvez utiliser HTML Purifier sans ces extensions.
|
|
||||||
|
|
||||||
|
|
||||||
2. Inclure la librairie
|
|
||||||
|
|
||||||
Quand vous devez l'utilisez, incluez le :
|
|
||||||
|
|
||||||
require_once('/path/to/library/HTMLPurifier.auto.php');
|
|
||||||
|
|
||||||
Ne pas l'inclure si ce n'est pas nécessaire, car HTML Purifier est lourd.
|
|
||||||
|
|
||||||
HTML Purifier utilise "autoload". Si vous avez défini la fonction __autoload,
|
|
||||||
vous devez ajouter cette fonction :
|
|
||||||
|
|
||||||
spl_autoload_register('__autoload')
|
|
||||||
|
|
||||||
Plus d'informations dans le document "INSTALL".
|
|
||||||
|
|
||||||
3. Installation rapide
|
|
||||||
|
|
||||||
Si votre site Web est en UTF-8 et XHTML Transitional, utilisez :
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once('/path/to/htmlpurifier/library/HTMLPurifier.auto.php');
|
|
||||||
$purificateur = new HTMLPurifier();
|
|
||||||
$html_propre = $purificateur->purify($html_a_purifier);
|
|
||||||
?>
|
|
||||||
|
|
||||||
Sinon, utilisez :
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once('/path/to/html/purifier/library/HTMLPurifier.auto.load');
|
|
||||||
$config = $HTMLPurifier_Config::createDefault();
|
|
||||||
$config->set('Core', 'Encoding', 'ISO-8859-1'); //Remplacez par votre
|
|
||||||
encodage
|
|
||||||
$config->set('Core', 'XHTML', true); //Remplacer par false si HTML 4.01
|
|
||||||
$purificateur = new HTMLPurifier($config);
|
|
||||||
$html_propre = $purificateur->purify($html_a_purifier);
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
1246
vendor/ezyang/htmlpurifier/NEWS
vendored
150
vendor/ezyang/htmlpurifier/TODO
vendored
|
@ -1,150 +0,0 @@
|
||||||
|
|
||||||
TODO List
|
|
||||||
|
|
||||||
= KEY ====================
|
|
||||||
# Flagship
|
|
||||||
- Regular
|
|
||||||
? Maybe I'll Do It
|
|
||||||
==========================
|
|
||||||
|
|
||||||
If no interest is expressed for a feature that may require a considerable
|
|
||||||
amount of effort to implement, it may get endlessly delayed. Do not be
|
|
||||||
afraid to cast your vote for the next feature to be implemented!
|
|
||||||
|
|
||||||
Things to do as soon as possible:
|
|
||||||
|
|
||||||
- http://htmlpurifier.org/phorum/read.php?3,5560,6307#msg-6307
|
|
||||||
- Think about allowing explicit order of operations hooks for transforms
|
|
||||||
- Fix "<.<" bug (trailing < is removed if not EOD)
|
|
||||||
- Build in better internal state dumps and debugging tools for remote
|
|
||||||
debugging
|
|
||||||
- Allowed/Allowed* have strange interactions when both set
|
|
||||||
? Transform lone embeds into object tags
|
|
||||||
- Deprecated config options that emit warnings when you set them (with'
|
|
||||||
a way of muting the warning if you really want to)
|
|
||||||
- Make HTML.Trusted work with Output.FlashCompat
|
|
||||||
- HTML.Trusted and HTML.SafeObject have funny interaction; general
|
|
||||||
problem is what to do when a module "supersedes" another
|
|
||||||
(see also tables and basic tables.) This is a little dicier
|
|
||||||
because HTML.SafeObject has some extra functionality that
|
|
||||||
trusted might find useful. See http://htmlpurifier.org/phorum/read.php?3,5762,6100
|
|
||||||
|
|
||||||
FUTURE VERSIONS
|
|
||||||
---------------
|
|
||||||
|
|
||||||
4.9 release [OMG CONFIG PONIES]
|
|
||||||
! Fix Printer. It's from the old days when we didn't have decent XML classes
|
|
||||||
! Factor demo.php into a set of Printer classes, and then create a stub
|
|
||||||
file for users here (inside the actual HTML Purifier library)
|
|
||||||
- Fix error handling with form construction
|
|
||||||
- Do encoding validation in Printers, or at least, where user data comes in
|
|
||||||
- Config: Add examples to everything (make built-in which also automatically
|
|
||||||
gives output)
|
|
||||||
- Add "register" field to config schemas to eliminate dependence on
|
|
||||||
naming conventions (try to remember why we ultimately decided on tihs)
|
|
||||||
|
|
||||||
5.0 release [HTML 5]
|
|
||||||
# Swap out code to use html5lib tokenizer and tree-builder
|
|
||||||
! Allow turning off of FixNesting and required attribute insertion
|
|
||||||
|
|
||||||
5.1 release [It's All About Trust] (floating)
|
|
||||||
# Implement untrusted, dangerous elements/attributes
|
|
||||||
# Implement IDREF support (harder than it seems, since you cannot have
|
|
||||||
IDREFs to non-existent IDs)
|
|
||||||
- Implement <area> (client and server side image maps are blocking
|
|
||||||
on IDREF support)
|
|
||||||
# Frameset XHTML 1.0 and HTML 4.01 doctypes
|
|
||||||
- Figure out how to simultaneously set %CSS.Trusted and %HTML.Trusted (?)
|
|
||||||
|
|
||||||
5.2 release [Error'ed]
|
|
||||||
# Error logging for filtering/cleanup procedures
|
|
||||||
# Additional support for poorly written HTML
|
|
||||||
- Microsoft Word HTML cleaning (i.e. MsoNormal, but research essential!)
|
|
||||||
- Friendly strict handling of <address> (block -> <br>)
|
|
||||||
- XSS-attempt detection--certain errors are flagged XSS-like
|
|
||||||
- Append something to duplicate IDs so they're still usable (impl. note: the
|
|
||||||
dupe detector would also need to detect the suffix as well)
|
|
||||||
|
|
||||||
6.0 release [Beyond HTML]
|
|
||||||
# Legit token based CSS parsing (will require revamping almost every
|
|
||||||
AttrDef class). Probably will use CSSTidy
|
|
||||||
# More control over allowed CSS properties using a modularization
|
|
||||||
# IRI support (this includes IDN)
|
|
||||||
- Standardize token armor for all areas of processing
|
|
||||||
|
|
||||||
7.0 release [To XML and Beyond]
|
|
||||||
- Extended HTML capabilities based on namespacing and tag transforms (COMPLEX)
|
|
||||||
- Hooks for adding custom processors to custom namespaced tags and
|
|
||||||
attributes, offer default implementation
|
|
||||||
- Lots of documentation and samples
|
|
||||||
|
|
||||||
Ongoing
|
|
||||||
- More refactoring to take advantage of PHP5's facilities
|
|
||||||
- Refactor unit tests into lots of test methods
|
|
||||||
- Plugins for major CMSes (COMPLEX)
|
|
||||||
- phpBB
|
|
||||||
- Also, a FAQ for extension writers with HTML Purifier
|
|
||||||
|
|
||||||
AutoFormat
|
|
||||||
- Smileys
|
|
||||||
- Syntax highlighting (with GeSHi) with <pre> and possibly <?php
|
|
||||||
- Look at http://drupal.org/project/Modules/category/63 for ideas
|
|
||||||
|
|
||||||
Neat feature related
|
|
||||||
! Support exporting configuration, so users can easily tweak settings
|
|
||||||
in the demo, and then copy-paste into their own setup
|
|
||||||
- Advanced URI filtering schemes (see docs/proposal-new-directives.txt)
|
|
||||||
- Allow scoped="scoped" attribute in <style> tags; may be troublesome
|
|
||||||
because regular CSS has no way of uniquely identifying nodes, so we'd
|
|
||||||
have to generate IDs
|
|
||||||
- Explain how to use HTML Purifier in non-PHP languages / create
|
|
||||||
a simple command line stub (or complicated?)
|
|
||||||
- Fixes for Firefox's inability to handle COL alignment props (Bug 915)
|
|
||||||
- Automatically add non-breaking spaces to empty table cells when
|
|
||||||
empty-cells:show is applied to have compatibility with Internet Explorer
|
|
||||||
- Table of Contents generation (XHTML Compiler might be reusable). May also
|
|
||||||
be out-of-band information.
|
|
||||||
- Full set of color keywords. Also, a way to add onto them without
|
|
||||||
finalizing the configuration object.
|
|
||||||
- Write a var_export and memcached DefinitionCache - Denis
|
|
||||||
- Built-in support for target="_blank" on all external links
|
|
||||||
- Convert RTL/LTR override characters to <bdo> tags, or vice versa on demand.
|
|
||||||
Also, enable disabling of directionality
|
|
||||||
? Externalize inline CSS to promote clean HTML, proposed by Sander Tekelenburg
|
|
||||||
? Remove redundant tags, ex. <u><u>Underlined</u></u>. Implementation notes:
|
|
||||||
1. Analyzing which tags to remove duplicants
|
|
||||||
2. Ensure attributes are merged into the parent tag
|
|
||||||
3. Extend the tag exclusion system to specify whether or not the
|
|
||||||
contents should be dropped or not (currently, there's code that could do
|
|
||||||
something like this if it didn't drop the inner text too.)
|
|
||||||
? Make AutoParagraph also support paragraph-izing double <br> tags, and not
|
|
||||||
just double newlines. This is kind of tough to do in the current framework,
|
|
||||||
though, and might be reasonably approximated by search replacing double <br>s
|
|
||||||
with newlines before running it through HTML Purifier.
|
|
||||||
|
|
||||||
Maintenance related (slightly boring)
|
|
||||||
# CHMOD install script for PEAR installs
|
|
||||||
! Factor out command line parser into its own class, and unit test it
|
|
||||||
- Reduce size of internal data-structures (esp. HTMLDefinition)
|
|
||||||
- Allow merging configurations. Thus,
|
|
||||||
a -> b -> default
|
|
||||||
c -> d -> default
|
|
||||||
becomes
|
|
||||||
a -> b -> c -> d -> default
|
|
||||||
Maybe allow more fine-grained tuning of this behavior. Alternatively,
|
|
||||||
encourage people to use short plist depths before building them up.
|
|
||||||
- Time PHPT tests
|
|
||||||
|
|
||||||
ChildDef related (very boring)
|
|
||||||
- Abstract ChildDef_BlockQuote to work with all elements that only
|
|
||||||
allow blocks in them, required or optional
|
|
||||||
- Implement lenient <ruby> child validation
|
|
||||||
|
|
||||||
Wontfix
|
|
||||||
- Non-lossy smart alternate character encoding transformations (unless
|
|
||||||
patch provided)
|
|
||||||
- Pretty-printing HTML: users can use Tidy on the output on entire page
|
|
||||||
- Native content compression, whitespace stripping: use gzip if this is
|
|
||||||
really important
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
4
vendor/ezyang/htmlpurifier/WHATSNEW
vendored
|
@ -1,4 +0,0 @@
|
||||||
HTML Purifier 4.13.x is a maintenance release which fixes
|
|
||||||
PSR-0 compatibility of our package. There are also a few
|
|
||||||
new features (%HTML.Forms and tg@bgcolor support) and
|
|
||||||
a number of minor bugfixes.
|
|
20
vendor/ezyang/htmlpurifier/WYSIWYG
vendored
|
@ -1,20 +0,0 @@
|
||||||
|
|
||||||
WYSIWYG - What You See Is What You Get
|
|
||||||
HTML Purifier: A Pretty Good Fit for TinyMCE and FCKeditor
|
|
||||||
|
|
||||||
Javascript-based WYSIWYG editors, simply stated, are quite amazing. But I've
|
|
||||||
always been wary about using them due to security issues: they handle the
|
|
||||||
client-side magic, but once you've been served a piping hot load of unfiltered
|
|
||||||
HTML, what should be done then? In some situations, you can serve it uncleaned,
|
|
||||||
since you only offer these facilities to trusted(?) authors.
|
|
||||||
|
|
||||||
Unfortunantely, for blog comments and anonymous input, BBCode, Textile and
|
|
||||||
other markup languages still reign supreme. Put simply: filtering HTML is
|
|
||||||
hard work, and these WYSIWYG authors don't offer anything to alleviate that
|
|
||||||
trouble. Therein lies the solution:
|
|
||||||
|
|
||||||
HTML Purifier is perfect for filtering pure-HTML input from WYSIWYG editors.
|
|
||||||
|
|
||||||
Enough said.
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
BIN
vendor/ezyang/htmlpurifier/art/1000passes.png
vendored
Before Width: | Height: | Size: 3.4 KiB |
BIN
vendor/ezyang/htmlpurifier/art/100cases.png
vendored
Before Width: | Height: | Size: 2.7 KiB |
BIN
vendor/ezyang/htmlpurifier/art/favicon.ico
vendored
Before Width: | Height: | Size: 9.1 KiB |
BIN
vendor/ezyang/htmlpurifier/art/icon-16x16.png
vendored
Before Width: | Height: | Size: 382 B |
101
vendor/ezyang/htmlpurifier/art/icon-16x16.svg
vendored
|
@ -1,101 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://web.resource.org/cc/"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
width="16.000000px"
|
|
||||||
height="16.000000px"
|
|
||||||
id="svg2"
|
|
||||||
sodipodi:version="0.32"
|
|
||||||
inkscape:version="0.42.2"
|
|
||||||
sodipodi:docbase="C:\DOCUME~1\Edward\MYDOCU~1\MYWEBS~1\HTMLPU~1\art"
|
|
||||||
sodipodi:docname="ICON-1~1.SVG"
|
|
||||||
inkscape:export-filename="C:\Documents and Settings\Edward\My Documents\My Webs\htmlpurifier\art\icon.png"
|
|
||||||
inkscape:export-xdpi="90.000000"
|
|
||||||
inkscape:export-ydpi="90.000000">
|
|
||||||
<defs
|
|
||||||
id="defs4">
|
|
||||||
<linearGradient
|
|
||||||
id="linearGradient5003">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#537ddd;stop-opacity:1.0000000;"
|
|
||||||
offset="0.00000000"
|
|
||||||
id="stop5005" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#000000;stop-opacity:1.0000000;"
|
|
||||||
offset="1.0000000"
|
|
||||||
id="stop5007" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
id="linearGradient4993">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#183577;stop-opacity:1.0000000;"
|
|
||||||
offset="0.00000000"
|
|
||||||
id="stop4995" />
|
|
||||||
<stop
|
|
||||||
id="stop5001"
|
|
||||||
offset="0.58142859"
|
|
||||||
style="stop-color:#8b9fbb;stop-opacity:1.0000000;" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ffffff;stop-opacity:1.0000000;"
|
|
||||||
offset="1.0000000"
|
|
||||||
id="stop4997" />
|
|
||||||
</linearGradient>
|
|
||||||
</defs>
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="base"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:zoom="23.255956"
|
|
||||||
inkscape:cx="3.2274095"
|
|
||||||
inkscape:cy="4.1487021"
|
|
||||||
inkscape:document-units="px"
|
|
||||||
inkscape:current-layer="layer1"
|
|
||||||
showgrid="false"
|
|
||||||
showguides="false"
|
|
||||||
gridspacingy="0.50000000cm"
|
|
||||||
gridspacingx="0.50000000cm"
|
|
||||||
gridoriginy="0.00000000cm"
|
|
||||||
gridoriginx="0.00000000cm"
|
|
||||||
gridtolerance="0.10000000cm"
|
|
||||||
gridempspacing="2"
|
|
||||||
inkscape:grid-points="true"
|
|
||||||
inkscape:grid-bbox="false"
|
|
||||||
inkscape:window-width="975"
|
|
||||||
inkscape:window-height="759"
|
|
||||||
inkscape:window-x="130"
|
|
||||||
inkscape:window-y="129" />
|
|
||||||
<metadata
|
|
||||||
id="metadata7">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<g
|
|
||||||
inkscape:label="Layer 1"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer1">
|
|
||||||
<path
|
|
||||||
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000004px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
|
|
||||||
d="M 6.1949060,157.57756 L 6.1949060,157.57756 z "
|
|
||||||
id="path1319" />
|
|
||||||
<path
|
|
||||||
style="fill:#224db0;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:6.0000000;stroke-linecap:butt;stroke-linejoin:round;marker-start:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
|
|
||||||
d="M 0.58257145,1.2121863 C 0.63548185,3.4711463 0.61139575,5.1777365 1.0905516,7.3958765 C 1.2484712,8.3223265 2.8202544,8.4670465 3.5807376,8.5653065 C 4.0690207,8.6283965 4.0902492,8.5661465 4.0906878,9.1995265 C 4.1064337,11.195036 4.0317991,11.792303 4.0906878,13.786273 C 4.0906878,15.786203 4.0909380,15.786453 6.0908601,15.786453 C 9.0907431,15.786453 10.414747,15.786053 12.414669,15.786053 C 14.414592,15.786053 14.414842,15.785813 14.414842,13.785893 C 14.418166,10.552283 14.404522,7.8374163 14.421897,4.6040763 C 14.625008,2.9294663 14.978320,2.5231063 15.830433,1.1499263 C 15.040843,1.1499263 14.943078,1.1493063 14.129102,1.1493063 C 8.8912931,1.1493063 5.8203807,1.2121863 0.58257145,1.2121863 z M 2.0905126,2.4028663 C 2.8330809,2.4028663 3.3476197,2.4028663 4.0901879,2.4028663 C 4.0901879,4.8586963 4.0906878,4.8408265 4.0906878,7.2966665 C 3.2248799,7.2967665 2.2374444,7.5239665 2.1488437,6.3255665 C 1.8765344,4.2270765 1.8837837,4.4962263 2.0905126,2.4028663 z M 5.4346466,6.5656265 L 6.8695071,6.5656265 L 6.8696331,13.558223 L 9.8657791,11.557663 L 9.8656551,6.5656265 L 13.070633,6.5656265 L 13.070633,13.786523 C 13.070633,14.786503 13.070633,14.786503 12.070671,14.786503 L 6.4158330,14.786503 C 5.5388453,14.786503 5.4347719,14.786723 5.4347719,13.786523 L 5.4346466,6.5656265 z "
|
|
||||||
id="path1325"
|
|
||||||
sodipodi:nodetypes="ccsccsscccsccccccccccccccccc" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 4.7 KiB |
BIN
vendor/ezyang/htmlpurifier/art/icon-32x32.png
vendored
Before Width: | Height: | Size: 615 B |
101
vendor/ezyang/htmlpurifier/art/icon-32x32.svg
vendored
|
@ -1,101 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://web.resource.org/cc/"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
width="16.000000px"
|
|
||||||
height="16.000000px"
|
|
||||||
id="svg2"
|
|
||||||
sodipodi:version="0.32"
|
|
||||||
inkscape:version="0.42.2"
|
|
||||||
sodipodi:docbase="C:\DOCUME~1\Edward\MYDOCU~1\MYWEBS~1\HTMLPU~1\art"
|
|
||||||
sodipodi:docname="icon-32x32.svg"
|
|
||||||
inkscape:export-filename="C:\Documents and Settings\Edward\My Documents\My Webs\htmlpurifier\art\icon-16x16.png"
|
|
||||||
inkscape:export-xdpi="90.000000"
|
|
||||||
inkscape:export-ydpi="90.000000">
|
|
||||||
<defs
|
|
||||||
id="defs4">
|
|
||||||
<linearGradient
|
|
||||||
id="linearGradient5003">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#537ddd;stop-opacity:1.0000000;"
|
|
||||||
offset="0.00000000"
|
|
||||||
id="stop5005" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#000000;stop-opacity:1.0000000;"
|
|
||||||
offset="1.0000000"
|
|
||||||
id="stop5007" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
id="linearGradient4993">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#183577;stop-opacity:1.0000000;"
|
|
||||||
offset="0.00000000"
|
|
||||||
id="stop4995" />
|
|
||||||
<stop
|
|
||||||
id="stop5001"
|
|
||||||
offset="0.58142859"
|
|
||||||
style="stop-color:#8b9fbb;stop-opacity:1.0000000;" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ffffff;stop-opacity:1.0000000;"
|
|
||||||
offset="1.0000000"
|
|
||||||
id="stop4997" />
|
|
||||||
</linearGradient>
|
|
||||||
</defs>
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="base"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:zoom="23.255956"
|
|
||||||
inkscape:cx="3.2274095"
|
|
||||||
inkscape:cy="4.1487021"
|
|
||||||
inkscape:document-units="px"
|
|
||||||
inkscape:current-layer="layer1"
|
|
||||||
showgrid="false"
|
|
||||||
showguides="false"
|
|
||||||
gridspacingy="0.50000000cm"
|
|
||||||
gridspacingx="0.50000000cm"
|
|
||||||
gridoriginy="0.00000000cm"
|
|
||||||
gridoriginx="0.00000000cm"
|
|
||||||
gridtolerance="0.10000000cm"
|
|
||||||
gridempspacing="2"
|
|
||||||
inkscape:grid-points="true"
|
|
||||||
inkscape:grid-bbox="false"
|
|
||||||
inkscape:window-width="975"
|
|
||||||
inkscape:window-height="759"
|
|
||||||
inkscape:window-x="130"
|
|
||||||
inkscape:window-y="129" />
|
|
||||||
<metadata
|
|
||||||
id="metadata7">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<g
|
|
||||||
inkscape:label="Layer 1"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer1">
|
|
||||||
<path
|
|
||||||
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000004px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
|
|
||||||
d="M 6.1949060,157.57756 L 6.1949060,157.57756 z "
|
|
||||||
id="path1319" />
|
|
||||||
<path
|
|
||||||
style="fill:#224db0;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:6.0000000;stroke-linecap:butt;stroke-linejoin:round;marker-start:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
|
|
||||||
d="M 0.58257145,1.2121863 C 0.63548185,3.4711463 0.61139575,5.1777365 1.0905516,7.3958765 C 1.2484712,8.3223265 2.8202544,8.4670465 3.5807376,8.5653065 C 4.0690207,8.6283965 4.0902492,8.5661465 4.0906878,9.1995265 C 4.1064337,11.195036 4.0317991,11.792303 4.0906878,13.786273 C 4.0906878,15.786203 4.0909380,15.786453 6.0908601,15.786453 C 9.0907431,15.786453 10.414747,15.786053 12.414669,15.786053 C 14.414592,15.786053 14.414842,15.785813 14.414842,13.785893 C 14.418166,10.552283 14.404522,7.8374163 14.421897,4.6040763 C 14.625008,2.9294663 14.978320,2.5231063 15.830433,1.1499263 C 15.040843,1.1499263 14.943078,1.1493063 14.129102,1.1493063 C 8.8912931,1.1493063 5.8203807,1.2121863 0.58257145,1.2121863 z M 2.0905126,2.4028663 C 2.8330809,2.4028663 3.3476197,2.4028663 4.0901879,2.4028663 C 4.0901879,4.8586963 4.0906878,4.8408265 4.0906878,7.2966665 C 3.2248799,7.2967665 2.2374444,7.5239665 2.1488437,6.3255665 C 1.8765344,4.2270765 1.8837837,4.4962263 2.0905126,2.4028663 z M 5.0906487,6.5656265 L 6.8695071,6.5656265 L 6.8696331,13.558223 L 9.8657791,11.557663 L 9.8656551,6.5656265 L 13.414631,6.5656265 L 13.414631,13.786523 C 13.414631,14.786503 13.414631,14.786503 12.414669,14.786503 L 6.0718351,14.786503 C 5.1948474,14.786503 5.0907740,14.786723 5.0907740,13.786523 L 5.0906487,6.5656265 z "
|
|
||||||
id="path1325"
|
|
||||||
sodipodi:nodetypes="ccsccsscccsccccccccccccccccc" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 4.7 KiB |
BIN
vendor/ezyang/htmlpurifier/art/icon-64x64.png
vendored
Before Width: | Height: | Size: 1 KiB |
BIN
vendor/ezyang/htmlpurifier/art/logo-large.png
vendored
Before Width: | Height: | Size: 9.8 KiB |
BIN
vendor/ezyang/htmlpurifier/art/logo.png
vendored
Before Width: | Height: | Size: 2.6 KiB |
119
vendor/ezyang/htmlpurifier/art/logo.svg
vendored
|
@ -1,119 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://web.resource.org/cc/"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
width="82.000000mm"
|
|
||||||
height="82.000000mm"
|
|
||||||
id="svg2"
|
|
||||||
sodipodi:version="0.32"
|
|
||||||
inkscape:version="0.42.2"
|
|
||||||
sodipodi:docbase="C:\Documents and Settings\Edward\My Documents\My Webs\htmlpurifier\art"
|
|
||||||
sodipodi:docname="logo-bold-large.svg">
|
|
||||||
<defs
|
|
||||||
id="defs4">
|
|
||||||
<linearGradient
|
|
||||||
id="linearGradient5003">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#537ddd;stop-opacity:1.0000000;"
|
|
||||||
offset="0.00000000"
|
|
||||||
id="stop5005" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#000000;stop-opacity:1.0000000;"
|
|
||||||
offset="1.0000000"
|
|
||||||
id="stop5007" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
id="linearGradient4993">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#183577;stop-opacity:1.0000000;"
|
|
||||||
offset="0.00000000"
|
|
||||||
id="stop4995" />
|
|
||||||
<stop
|
|
||||||
id="stop5001"
|
|
||||||
offset="0.58142859"
|
|
||||||
style="stop-color:#8b9fbb;stop-opacity:1.0000000;" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ffffff;stop-opacity:1.0000000;"
|
|
||||||
offset="1.0000000"
|
|
||||||
id="stop4997" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient4993"
|
|
||||||
id="linearGradient4999"
|
|
||||||
x1="283.46457"
|
|
||||||
y1="141.72675"
|
|
||||||
x2="11.135608"
|
|
||||||
y2="141.72675"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="translate(2.000000,4.000000)" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient5003"
|
|
||||||
id="linearGradient5009"
|
|
||||||
x1="2.9621078"
|
|
||||||
y1="141.72675"
|
|
||||||
x2="283.46457"
|
|
||||||
y2="141.72675"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="translate(2.000000,4.000000)" />
|
|
||||||
</defs>
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="base"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:zoom="1.0000000"
|
|
||||||
inkscape:cx="100.23897"
|
|
||||||
inkscape:cy="178.03397"
|
|
||||||
inkscape:document-units="px"
|
|
||||||
inkscape:current-layer="layer1"
|
|
||||||
showgrid="false"
|
|
||||||
showguides="false"
|
|
||||||
gridspacingy="0.50000000cm"
|
|
||||||
gridspacingx="0.50000000cm"
|
|
||||||
gridoriginy="0.00000000cm"
|
|
||||||
gridoriginx="0.00000000cm"
|
|
||||||
gridtolerance="0.10000000cm"
|
|
||||||
gridempspacing="2"
|
|
||||||
inkscape:grid-points="true"
|
|
||||||
inkscape:grid-bbox="false"
|
|
||||||
inkscape:window-width="975"
|
|
||||||
inkscape:window-height="759"
|
|
||||||
inkscape:window-x="139"
|
|
||||||
inkscape:window-y="88" />
|
|
||||||
<metadata
|
|
||||||
id="metadata7">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<g
|
|
||||||
inkscape:label="Layer 1"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer1">
|
|
||||||
<path
|
|
||||||
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
|
|
||||||
d="M 19.726130,9.6194746 L 19.726130,9.6194746 z "
|
|
||||||
id="path1319" />
|
|
||||||
<path
|
|
||||||
style="fill:url(#linearGradient4999);fill-opacity:1.0000000;fill-rule:evenodd;stroke:url(#linearGradient5009);stroke-width:10.000000;stroke-linecap:butt;stroke-linejoin:round;marker-start:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
|
|
||||||
d="M 4.9621078,5.1031050 C 5.8995325,45.125639 5.4727947,85.709799 13.962107,125.00936 C 16.760003,141.42321 35.988453,143.98728 49.462107,145.72811 C 58.113128,146.84585 67.112800,145.74318 67.120572,156.96457 C 67.399545,192.31975 66.077225,216.69948 67.120572,252.02707 C 67.120572,287.46015 67.125004,287.46457 102.55807,287.46457 C 155.70768,287.46457 179.16536,287.45768 214.59843,287.45768 C 250.03151,287.45768 250.03593,287.45325 250.03593,252.02018 C 250.09483,194.72943 249.85310,122.48395 250.16093,65.197704 C 253.75952,35.528496 270.36749,28.328596 285.46457,4.0000020 C 271.47521,4.0000020 259.39483,3.9889299 244.97343,3.9889297 C 152.17399,3.9889293 97.761552,5.1031060 4.9621078,5.1031050 z M 31.678643,26.198667 C 44.834892,26.198667 53.955464,26.198667 67.111714,26.198667 C 67.111713,69.709084 67.120572,79.741005 67.120572,123.25143 C 51.780853,123.25317 34.281868,127.27859 32.712107,106.04622 C 27.887543,68.866763 28.015982,63.286945 31.678643,26.198667 z M 84.837103,110.29921 L 102.55585,110.29921 L 102.55807,247.98656 L 155.64148,212.54217 L 155.63926,110.29921 L 232.31496,110.29921 L 232.31496,252.03150 C 232.31496,269.74803 232.31496,269.74803 214.59843,269.74803 L 102.22100,269.74803 C 86.683215,269.74803 84.839322,269.75212 84.839322,252.03150 L 84.837103,110.29921 z "
|
|
||||||
id="path1325"
|
|
||||||
sodipodi:nodetypes="ccsccsscccsccccccccccccccccc" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 5.3 KiB |
BIN
vendor/ezyang/htmlpurifier/art/powered.png
vendored
Before Width: | Height: | Size: 297 B |
|
@ -1,7 +0,0 @@
|
||||||
<IfModule mod_authz_core.c>
|
|
||||||
Require all denied
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
<IfModule !mod_authz_core.c>
|
|
||||||
Deny from all
|
|
||||||
</ifModule>
|
|
|
@ -1,16 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
chdir(dirname(__FILE__));
|
|
||||||
|
|
||||||
//require_once '../library/HTMLPurifier.path.php';
|
|
||||||
shell_exec('php ../maintenance/generate-schema-cache.php');
|
|
||||||
require_once '../library/HTMLPurifier.path.php';
|
|
||||||
require_once 'HTMLPurifier.includes.php';
|
|
||||||
|
|
||||||
$begin = xdebug_memory_usage();
|
|
||||||
|
|
||||||
$schema = HTMLPurifier_ConfigSchema::makeFromSerial();
|
|
||||||
|
|
||||||
echo xdebug_memory_usage() - $begin;
|
|
||||||
|
|
||||||
// vim: et sw=4 sts=4
|
|
161
vendor/ezyang/htmlpurifier/benchmarks/Lexer.php
vendored
|
@ -1,161 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
require_once '../library/HTMLPurifier.auto.php';
|
|
||||||
@include_once '../test-settings.php';
|
|
||||||
|
|
||||||
// PEAR
|
|
||||||
require_once 'Benchmark/Timer.php'; // to do the timing
|
|
||||||
require_once 'Text/Password.php'; // for generating random input
|
|
||||||
|
|
||||||
$LEXERS = array();
|
|
||||||
$RUNS = isset($GLOBALS['HTMLPurifierTest']['Runs'])
|
|
||||||
? $GLOBALS['HTMLPurifierTest']['Runs'] : 2;
|
|
||||||
|
|
||||||
require_once 'HTMLPurifier/Lexer/DirectLex.php';
|
|
||||||
$LEXERS['DirectLex'] = new HTMLPurifier_Lexer_DirectLex();
|
|
||||||
|
|
||||||
if (version_compare(PHP_VERSION, '5', '>=')) {
|
|
||||||
require_once 'HTMLPurifier/Lexer/DOMLex.php';
|
|
||||||
$LEXERS['DOMLex'] = new HTMLPurifier_Lexer_DOMLex();
|
|
||||||
}
|
|
||||||
|
|
||||||
// custom class to aid unit testing
|
|
||||||
class RowTimer extends Benchmark_Timer
|
|
||||||
{
|
|
||||||
|
|
||||||
public $name;
|
|
||||||
|
|
||||||
public function __construct($name, $auto = false)
|
|
||||||
{
|
|
||||||
$this->name = htmlentities($name);
|
|
||||||
$this->Benchmark_Timer($auto);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getOutput()
|
|
||||||
{
|
|
||||||
$total = $this->TimeElapsed();
|
|
||||||
$result = $this->getProfiling();
|
|
||||||
$dashes = '';
|
|
||||||
|
|
||||||
$out = '<tr>';
|
|
||||||
|
|
||||||
$out .= "<td>{$this->name}</td>";
|
|
||||||
|
|
||||||
$standard = false;
|
|
||||||
|
|
||||||
foreach ($result as $k => $v) {
|
|
||||||
if ($v['name'] == 'Start' || $v['name'] == 'Stop') continue;
|
|
||||||
|
|
||||||
//$perc = (($v['diff'] * 100) / $total);
|
|
||||||
//$tperc = (($v['total'] * 100) / $total);
|
|
||||||
|
|
||||||
//$out .= '<td align="right">' . $v['diff'] . '</td>';
|
|
||||||
|
|
||||||
if ($standard == false) $standard = $v['diff'];
|
|
||||||
|
|
||||||
$perc = $v['diff'] * 100 / $standard;
|
|
||||||
$bad_run = ($v['diff'] < 0);
|
|
||||||
|
|
||||||
$out .= '<td align="right"'.
|
|
||||||
($bad_run ? ' style="color:#AAA;"' : '').
|
|
||||||
'>' . number_format($perc, 2, '.', '') .
|
|
||||||
'%</td><td>'.number_format($v['diff'],4,'.','').'</td>';
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$out .= '</tr>';
|
|
||||||
|
|
||||||
return $out;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function print_lexers()
|
|
||||||
{
|
|
||||||
global $LEXERS;
|
|
||||||
$first = true;
|
|
||||||
foreach ($LEXERS as $key => $value) {
|
|
||||||
if (!$first) echo ' / ';
|
|
||||||
echo htmlspecialchars($key);
|
|
||||||
$first = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function do_benchmark($name, $document)
|
|
||||||
{
|
|
||||||
global $LEXERS, $RUNS;
|
|
||||||
|
|
||||||
$config = HTMLPurifier_Config::createDefault();
|
|
||||||
$context = new HTMLPurifier_Context();
|
|
||||||
|
|
||||||
$timer = new RowTimer($name);
|
|
||||||
$timer->start();
|
|
||||||
|
|
||||||
foreach($LEXERS as $key => $lexer) {
|
|
||||||
for ($i=0; $i<$RUNS; $i++) $tokens = $lexer->tokenizeHTML($document, $config, $context);
|
|
||||||
$timer->setMarker($key);
|
|
||||||
}
|
|
||||||
|
|
||||||
$timer->stop();
|
|
||||||
$timer->display();
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Benchmark: <?php print_lexers(); ?></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Benchmark: <?php print_lexers(); ?></h1>
|
|
||||||
<table border="1">
|
|
||||||
<tr><th>Case</th><?php
|
|
||||||
foreach ($LEXERS as $key => $value) {
|
|
||||||
echo '<th colspan="2">' . htmlspecialchars($key) . '</th>';
|
|
||||||
}
|
|
||||||
?></tr>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
// ************************************************************************** //
|
|
||||||
|
|
||||||
// sample of html pages
|
|
||||||
|
|
||||||
$dir = 'samples/Lexer';
|
|
||||||
$dh = opendir($dir);
|
|
||||||
while (false !== ($filename = readdir($dh))) {
|
|
||||||
|
|
||||||
if (strpos($filename, '.html') !== strlen($filename) - 5) continue;
|
|
||||||
$document = file_get_contents($dir . '/' . $filename);
|
|
||||||
do_benchmark("File: $filename", $document);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// crashers, caused infinite loops before
|
|
||||||
|
|
||||||
$snippets = array();
|
|
||||||
$snippets[] = '<a href="foo>';
|
|
||||||
$snippets[] = '<a "=>';
|
|
||||||
|
|
||||||
foreach ($snippets as $snippet) {
|
|
||||||
do_benchmark($snippet, $snippet);
|
|
||||||
}
|
|
||||||
|
|
||||||
// random input
|
|
||||||
|
|
||||||
$random = Text_Password::create(80, 'unpronounceable', 'qwerty <>="\'');
|
|
||||||
|
|
||||||
do_benchmark('Random input', $random);
|
|
||||||
|
|
||||||
?></table>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
echo '<div>Random input was: ' .
|
|
||||||
'<span colspan="4" style="font-family:monospace;">' .
|
|
||||||
htmlspecialchars($random) . '</span></div>';
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
</body></html>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
// vim: et sw=4 sts=4
|
|
21
vendor/ezyang/htmlpurifier/benchmarks/Trace.php
vendored
|
@ -1,21 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
ini_set('xdebug.trace_format', 1);
|
|
||||||
ini_set('xdebug.show_mem_delta', true);
|
|
||||||
|
|
||||||
if (file_exists('Trace.xt')) {
|
|
||||||
echo "Previous trace Trace.xt must be removed before this script can be run.";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
xdebug_start_trace(dirname(__FILE__) . '/Trace');
|
|
||||||
require_once '../library/HTMLPurifier.auto.php';
|
|
||||||
|
|
||||||
$purifier = new HTMLPurifier();
|
|
||||||
|
|
||||||
$data = $purifier->purify(file_get_contents('samples/Lexer/4.html'));
|
|
||||||
xdebug_stop_trace();
|
|
||||||
|
|
||||||
echo "Trace finished.";
|
|
||||||
|
|
||||||
// vim: et sw=4 sts=4
|
|
|
@ -1,56 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Main Page - Huaxia Taiji Club</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<link rel="stylesheet" type="text/css" media="screen, projection" href="/screen.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" media="print" href="/print.css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div id="translation"><a href="/ch/Main_Page">中文</a></div>
|
|
||||||
|
|
||||||
<div id="heading"><a href="/en/Main_Page" title="English Main Page">Huaxia Taiji Club</a>
|
|
||||||
<a class="heading_ch" href="/ch/Main_Page" title="中文主页">华夏太极俱乐部</a></div>
|
|
||||||
<ul id="menu">
|
|
||||||
<li><a href="/en/Main_Page" class="active">Main Page</a></li><li><a href="/en/About">About</a></li><li><a href="/en/News">News</a></li><li><a href="/en/Events">Events</a></li><li><a href="/en/Digest">Digest</a></li><li><a href="/en/Taiji_and_I">Taiji and I</a></li><li><a href="/en/Downloads">Downloads</a></li><li><a href="/en/Registration">Registration</a></li><li><a href="/en/Contact">Contact</a></li> <li><a href="http://www.taijiclub.org/gallery2/main.php">Gallery</a></li>
|
|
||||||
|
|
||||||
<li><a href="http://www.taijiclub.org/forums/index.php">Forums</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<div id="content">
|
|
||||||
<h1 id="title">Main Page</h1><h2>Taiji (Tai Chi) </h2>
|
|
||||||
|
|
||||||
<div id="sidebar">
|
|
||||||
<h3>Recent News</h3>
|
|
||||||
<ul>
|
|
||||||
<li>Zou Xiaojun was elected as the new club vice president </li>
|
|
||||||
|
|
||||||
<li>HX Edison Taiji Club <a href="http://www.taijiclub.org/downloads/Taiji_club_regulation_.pdf">by-law</a> effective 3/28/2006</li>
|
|
||||||
<li>A new email account for our club: HXEdisontaijiclub@yahoo.com</li>
|
|
||||||
|
|
||||||
<li>Workshop conducted by <a href="http://www.taijiclub.org/ch/Digest/LiDeyin">?????</a> Li Deyin is set on June 4, 2006 at Clarion Hotel in Edison from 9:30am-12pm; <a href="http://www.taijiclub.org/en/Registration">Registration</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p><i>Taiji</i> is an ancient Chinese tradition of movement systems that is associated with philosophy, physiology, psychology, geometry and dynamics. It is the slowest form of martial arts and is meant to improve the internal spirit. It is soothing to the soul and extremely invigorating. </p>
|
|
||||||
|
|
||||||
<p>The founder of Taiji was Zhang Sanfeng (Chang San-feng), who was a monk of the Wu Dang (Wu Tang) Monastery and lived in the period from 1391 to 1459. His exercises stressed suppleness and elasticity as opposed to the hardness and force of other martial art styles. Several centuries old, Taiji was originally developed as a form of self-defense, emphasizing strength, balance, flexibility and speed. Tai Chi also differs from other martial arts in that it is based on the Taoist religion and aims to avoid aggressive forces. </p>
|
|
||||||
|
|
||||||
<p>Modern Taiji includes many forms — Quan, Sword and Fan. Impacting the mind and body of the practitioners, Taiji is practiced as a meditative exercise made up of a series of forms, or choreographed motions, requiring slow, gentle movement of the arms, legs and torso. Taiji practitioners learn to center their attention on their breathing and body movements so that the exercise strengthens their overall mental and physical awareness. In a sense, Taiji is similar to yoga in that it is also a form of moving meditation, with the goal of achieving stillness through the motion and awareness of breath. To perform Taiji, practitioners have to empty their mind of thoughts and worries in order to achieve harmony. It is a great aid for reducing stress and improving the quality of life. </p>
|
|
||||||
|
|
||||||
<p>In China and in communities all over the world, Taiji is practiced by young and old in the early morning hours. It's a great way to bring a new and fresh day!</p>
|
|
||||||
|
|
||||||
<p>Check out our <a href="/gallery2/main.php">gallery</a>.</p>
|
|
||||||
|
|
||||||
<div style="text-align:center;"><a href="http://www.taijiclub.org/gallery2/v/2006/group1b.jpg.html?g2_imageViewsIndex=1"><img src="/gallery2/d/1836-2/group1b.jpg" /></a></div>
|
|
||||||
|
|
||||||
<div style="text-align:center;">Click on photo to see HR version</div></div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
|
@ -1,20 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Google</title><style><!--
|
|
||||||
body,td,a,p,.h{font-family:arial,sans-serif;}
|
|
||||||
.h{font-size: 20px;}
|
|
||||||
.q{color:#0000cc;}
|
|
||||||
//-->
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
<!--
|
|
||||||
function sf(){document.f.q.focus();}
|
|
||||||
function rwt(el,ct,cd,sg){var e = window.encodeURIComponent ? encodeURIComponent : escape;el.href="/url?sa=t&ct="+e(ct)+"&cd="+e(cd)+"&url="+e(el.href).replace(/\+/g,"%2B")+"&ei=fHNBRJDEG4HSaLONmIoP"+sg;el.onmousedown="";return true;}
|
|
||||||
// -->
|
|
||||||
</script>
|
|
||||||
</head><body bgcolor=#ffffff text=#000000 link=#0000cc vlink=#551a8b alink=#ff0000 onLoad=sf() topmargin=3 marginheight=3><center><table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td align=right nowrap><font size=-1><b>edwardzyang@gmail.com</b> | <a href="/url?sa=p&pref=ig&pval=2&q=http://www.google.com/ig%3Fhl%3Den" onmousedown="return rwt(this,'pro','hppphou:def','&sig2=hDbTpsWIp9YG37a23n6krQ')">Personalized Home</a> | <a href="/searchhistory/?hl=en">Search History</a> | <a href="https://www.google.com/accounts/ManageAccount">My Account</a> | <a href="http://www.google.com/accounts/Logout?continue=http://www.google.com/">Sign out</a></font></td></tr><tr height=4><td><img alt="" width=1 height=1></td></tr></table><img src="/intl/en/images/logo.gif" width=276 height=110 alt="Google"><br><br>
|
|
||||||
<form action=/search name=f><script><!--
|
|
||||||
function qs(el) {if (window.RegExp && window.encodeURIComponent) {var ue=el.href;var qe=encodeURIComponent(document.f.q.value);if(ue.indexOf("q=")!=-1){el.href=ue.replace(new RegExp("q=[^&$]*"),"q="+qe);}else{el.href=ue+"&q="+qe;}}return 1;}
|
|
||||||
// -->
|
|
||||||
</script><table border=0 cellspacing=0 cellpadding=4><tr><td nowrap><font size=-1><b>Web</b> <a id=1a class=q href="/imghp?hl=en&tab=wi" onClick="return qs(this);">Images</a> <a id=2a class=q href="http://groups.google.com/grphp?hl=en&tab=wg" onClick="return qs(this);">Groups</a> <a id=4a class=q href="http://news.google.com/nwshp?hl=en&tab=wn" onClick="return qs(this);">News</a> <a id=5a class=q href="http://froogle.google.com/frghp?hl=en&tab=wf" onClick="return qs(this);">Froogle</a> <a id=8a class=q href="/lochp?hl=en&tab=wl" onClick="return qs(this);">Local</a> <b><a href="/intl/en/options/" class=q>more »</a></b></font></td></tr></table><table cellspacing=0 cellpadding=0><tr><td width=25%> </td><td align=center><input type=hidden name=hl value=en><input maxlength=2048 size=55 name=q value="" title="Google Search"><br><input type=submit value="Google Search" name=btnG><input type=submit value="I'm Feeling Lucky" name=btnI></td><td valign=top nowrap width=25%><font size=-2> <a href=/advanced_search?hl=en>Advanced Search</a><br> <a href=/preferences?hl=en>Preferences</a><br> <a href=/language_tools?hl=en>Language Tools</a></font></td></tr></table></form><br><br><font size=-1><a href="/ads/">Advertising Programs</a> - <a href=/services/>Business Solutions</a> - <a href=/about.html>About Google</a></font><p><font size=-2>©2006 Google</font></p></center></body></html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
|
@ -1,131 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Anime Digi-Lib Index</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<div id="tb">
|
|
||||||
|
|
||||||
<form name="lycos_search" method="get" target="_new" style="margin: 0px"
|
|
||||||
action="http://r.hotbot.com/r/memberpgs_lycos_searchbox_af/http://www.angelfire.lycos.com/cgi-bin/search/pursuit">
|
|
||||||
|
|
||||||
<table id="tbtable" cellpadding="0" cellspacing="0" border="0" width="100%" style="border: 1px solid black;">
|
|
||||||
<tr style="background-color: #dcf7ff">
|
|
||||||
<td colspan="3">
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td> Search:</td>
|
|
||||||
|
|
||||||
<td><input type="radio" name="cat" value="lycos" checked></td>
|
|
||||||
<td nowrap="nowrap">The Web</td>
|
|
||||||
<td><input type="radio" name="cat" value="angelfire"></td>
|
|
||||||
<td nowrap="nowrap">Angelfire</td>
|
|
||||||
<td nowrap="nowrap"> <img src="http://af.lygo.com/d/toolbar/planeticon.gif"></td><td nowrap="nowrap"> <a href="http://r.lycos.com/r/tlbr_planet/http://planet.lycos.com" target="_new">Planet</a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<td nowrap="nowrap"><a href="http://lt.angelfire.com/af_toolbar/edit/_h_/www.angelfire.lycos.com/build/index.tmpl" target="_top">
|
|
||||||
<span id="build">Edit your Site</span></a> </td>
|
|
||||||
|
|
||||||
<td><img src="http://af.lygo.com/d/toolbar/dir.gif" alt="show site directory" border="0" height="10" hspace="3" width="8"></td>
|
|
||||||
<td nowrap="nowrap"><a href="http://lt.angelfire.com/af_toolbar/browse/_h_/www.angelfire.lycos.com/directory/index.tmpl" target="_top">Browse Sites</a> </td>
|
|
||||||
<td><a href="http://lt.angelfire.com/af_toolbar/angelfire/_h_/www.angelfire.lycos.com" target="_top"><img src="http://af.lygo.com/d/toolbar/aflogo_top.gif" alt="hosted by angelfire" border="0" height="26" width="143"></a></td>
|
|
||||||
</tr>
|
|
||||||
<tr style="background-color: #dcf7ff">
|
|
||||||
<td nowrap="nowrap" valign="middle"> <input size="30" style="font-size: 10px; background-color: #fff;" type="text" name="query" id="searchbox"></td>
|
|
||||||
|
|
||||||
<td style="background: #fff url(http://af.lygo.com/d/toolbar/bg.gif) repeat-x; text-align: center;" colspan="3" align="center">
|
|
||||||
<a href="http://clk.atdmt.com/VON/go/lycsnvon0710000019von/direct/01/"><img src="/sys/free_logo_xxxx_157x20.gif" height="20" width="157" border="0" alt="Vonage"></a><img src="http://view.atdmt.com/VON/view/lycsnvon0710000019von/direct/01/"></td>
|
|
||||||
|
|
||||||
<span style="font-size: 11px;">
|
|
||||||
<span style="color:#00f; font-weight:bold;">«</span>
|
|
||||||
<span id="top100">
|
|
||||||
<a href="javascript:void top100('prev')" target="_top">Previous</a> |
|
|
||||||
<a href="http://lt.angelfire.com/af_toolbar/top100/_h_/www.angelfire.lycos.com/cgi-bin/top100/pagelist?start=1" target="_top">Top 100</a> |
|
|
||||||
<a href="javascript:void top100('next')" target="_top">Next</a>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
<span style="color: #00f; font-weight: bold;">»</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td valign="top" style="background: #fff url(http://af.lygo.com/d/toolbar/bg.gif) repeat-x;"><a href="http://lt.angelfire.com/af_toolbar/angelfire/_h_/www.angelfire.lycos.com" target="_top"><img src="http://af.lygo.com/d/toolbar/aflogo_bot.gif" alt="hosted by angelfire" border="0" height="22" width="143"></a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" width="728"><tr><td>
|
|
||||||
<script type="text/javascript">
|
|
||||||
if (objAdMgr.isSlotAvailable("leaderboard")) {
|
|
||||||
objAdMgr.renderSlot("leaderboard")
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<noscript>
|
|
||||||
<a href="http://network.realmedia.com/RealMedia/ads/click_nx.ads/lycosangelfire/ros/728x90/wp/ss/a/491169@Top1?x"><img border="0" src="http://network.realmedia.com/RealMedia/ads/adstream_nx.ads/lycosangelfire/ros/728x90/wp/ss/a/491169@Top1" alt="leaderboard ad" /></a>
|
|
||||||
</noscript>
|
|
||||||
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
<table width="86%" border="0" cellspacing="0" cellpadding="2">
|
|
||||||
<tr>
|
|
||||||
<td height="388" width="19%" bgcolor="#FFCCFF" valign="top">
|
|
||||||
<p>May 1, 2000</p>
|
|
||||||
<p><b>Pop Culture</b> </p>
|
|
||||||
<p>by. H. Finkelstein</p>
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td height="388" width="52%" valign="top">
|
|
||||||
<p>Welcome to the <b>Anime Digi-Lib</b>, a virtual index to anime on the
|
|
||||||
internet. This site strives to house a comprehensive index to both personal
|
|
||||||
and commercial websites and provides reviews to these sites. We hope to
|
|
||||||
be a gateway for people who've never imagined they'd ever be interested
|
|
||||||
in Japanese Animation. </p>
|
|
||||||
<table width="99%" border="1" cellspacing="0" cellpadding="2" height="320" name="Searchnservices">
|
|
||||||
<tr>
|
|
||||||
<td height="263" valign="top" width="58%">
|
|
||||||
<p> </p>
|
|
||||||
<p> </p>
|
|
||||||
|
|
||||||
<FORM ACTION="/cgi-bin/script_library/site_search/search" METHOD="GET">
|
|
||||||
|
|
||||||
<table border="0" cellpadding="2" cellspacing="0">
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">Search term: <INPUT NAME="search_term"><br></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" align="center">Case-sensitive -
|
|
||||||
<INPUT TYPE="checkbox" NAME="case_sensitive">yes<br></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="right"><INPUT TYPE="radio" NAME="search_type" VALUE="exact" CHECKED>exact</td>
|
|
||||||
<td><INPUT TYPE="radio" NAME="search_type" VALUE="fuzzy">fuzzy<br></td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" align="center"><INPUT TYPE="hidden" NAME="display" VALUE="#FF0000"><INPUT TYPE="submit"></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
<td>
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
||||||
<tr><td><font face="verdana,geneva" color="#000011" size="1">What is better, subtitled or dubbed anime?</font></td></tr>
|
|
||||||
<tr><td><input type="radio" name="rd" value="1"><font face="verdana" size="2" color="#000011">Subtitled</font></td></tr>
|
|
||||||
|
|
||||||
<tr><td align="middle"><font face="verdana" size="1"><a href="http://pub.alxnet.com/poll?id=2079873&q=view">Current results</a></font></td></tr>
|
|
||||||
</table></td></tr>
|
|
||||||
<tr>
|
|
||||||
<td><font face="verdana" size="1"><a href="http://www.alxnet.com/services/poll/">Free
|
|
||||||
Web Polls</a></font></td>
|
|
||||||
</tr>
|
|
||||||
</table></form>
|
|
||||||
<!-- Alxnet.com -- web poll code ends -->
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
|
@ -1,543 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="keywords" content="Tai Chi Chuan,Yang Pan-hou,Yang Chien-hou,Yang style Tai Chi Chuan,Yang Lu-ch'an,Wu/Hao style T'ai Chi Ch'uan,Wu Ch'uan-yü,Hao Wei-chen,Yang Shou-chung,Wu style T'ai Chi Ch'uan,Wu Chien-ch'üan" />
|
|
||||||
<link rel="shortcut icon" href="/favicon.ico" />
|
|
||||||
<link rel="copyright" href="http://www.gnu.org/copyleft/fdl.html" />
|
|
||||||
<title>Tai Chi Chuan - Wikipedia, the free encyclopedia</title>
|
|
||||||
<style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "/skins-1.5/monobook/main.css?9"; /*]]>*/</style>
|
|
||||||
<link rel="stylesheet" type="text/css" media="print" href="/skins-1.5/common/commonPrint.css" />
|
|
||||||
|
|
||||||
<!--[if lt IE 5.5000]><style type="text/css">@import "/skins-1.5/monobook/IE50Fixes.css";</style><![endif]-->
|
|
||||||
<!--[if IE 5.5000]><style type="text/css">@import "/skins-1.5/monobook/IE55Fixes.css";</style><![endif]-->
|
|
||||||
<!--[if IE 6]><style type="text/css">@import "/skins-1.5/monobook/IE60Fixes.css";</style><![endif]-->
|
|
||||||
<!--[if IE 7]><style type="text/css">@import "/skins-1.5/monobook/IE70Fixes.css?1";</style><![endif]-->
|
|
||||||
<!--[if lt IE 7]><script type="text/javascript" src="/skins-1.5/common/IEFixes.js"></script>
|
|
||||||
<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
|
|
||||||
<script type="text/javascript">var skin = 'monobook';var stylepath = '/skins-1.5';</script>
|
|
||||||
<script type="text/javascript" src="/skins-1.5/common/wikibits.js?1"><!-- wikibits js --></script>
|
|
||||||
<script type="text/javascript" src="/w/index.php?title=-&action=raw&smaxage=0&gen=js"><!-- site js --></script>
|
|
||||||
|
|
||||||
<style type="text/css">/*<![CDATA[*/
|
|
||||||
@import "/w/index.php?title=MediaWiki:Common.css&action=raw&ctype=text/css&smaxage=2678400";
|
|
||||||
@import "/w/index.php?title=MediaWiki:Monobook.css&action=raw&ctype=text/css&smaxage=2678400";
|
|
||||||
@import "/w/index.php?title=-&action=raw&gen=css&maxage=2678400&ts=20060721225848";
|
|
||||||
@import "/w/index.php?title=User:Edward_Z._Yang/monobook.css&action=raw&ctype=text/css";
|
|
||||||
/*]]>*/</style>
|
|
||||||
<script type="text/javascript" src="/w/index.php?title=User:Edward_Z._Yang/monobook.js&action=raw&ctype=text/javascript&dontcountme=s"></script>
|
|
||||||
<!-- Head Scripts -->
|
|
||||||
</head>
|
|
||||||
<body class="ns-0 ltr">
|
|
||||||
<div id="globalWrapper">
|
|
||||||
<div id="column-content">
|
|
||||||
<div id="content">
|
|
||||||
|
|
||||||
<a name="top" id="top"></a>
|
|
||||||
<div id="siteNotice"><div id="wikimania2006" style="text-align:right; font-size:80%"><a href="http://wm06reg.wikimedia.org/" class="external text" title="http://wm06reg.wikimedia.org/">Registration</a> for <a href="http://wikimania2006.wikimedia.org" class="external text" title="http://wikimania2006.wikimedia.org">Wikimania 2006</a> is open. </div>
|
|
||||||
</div> <h1 class="firstHeading">Tai Chi Chuan</h1>
|
|
||||||
<div id="bodyContent">
|
|
||||||
<h3 id="siteSub">From Wikipedia, the free encyclopedia</h3>
|
|
||||||
|
|
||||||
<div id="contentSub"></div>
|
|
||||||
<div id="jump-to-nav">Jump to: <a href="#column-one">navigation</a>, <a href="#searchInput">search</a></div> <!-- start content -->
|
|
||||||
<table border="1" cellpadding="2" cellspacing="0" align="right">
|
|
||||||
<tr>
|
|
||||||
<th colspan="2" bgcolor="#FFCCCC"><big>???</big></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
|
|
||||||
<div class="center">
|
|
||||||
<div class="thumb tnone">
|
|
||||||
<div style="width:182px;"><a href="/wiki/Image:Yang_Ch%27eng-fu_circa_1918.jpg" class="internal" title="Yang Chengfu in a posture from the Tai Chi solo form known as Single Whip, circa 1918"><img src="http://upload.wikimedia.org/wikipedia/en/thumb/d/d1/Yang_Ch%27eng-fu_circa_1918.jpg/180px-Yang_Ch%27eng-fu_circa_1918.jpg" alt="Yang Chengfu in a posture from the Tai Chi solo form known as Single Whip, circa 1918" width="180" height="255" longdesc="/wiki/Image:Yang_Ch%27eng-fu_circa_1918.jpg" /></a>
|
|
||||||
<div class="thumbcaption">
|
|
||||||
<div class="magnify" style="float:right"><a href="/wiki/Image:Yang_Ch%27eng-fu_circa_1918.jpg" class="internal" title="Enlarge"><img src="/skins-1.5/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div>
|
|
||||||
<b><a href="/wiki/Yang_Chengfu" title="Yang Chengfu">Yang Chengfu</a> in a posture from the Tai Chi solo form known as <i>Single Whip</i>, circa <a href="/wiki/1918" title="1918">1918</a></b></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<th colspan="2"><a href="/wiki/Chinese_language" title="Chinese language">Chinese</a> Name</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="/wiki/Hanyu_Pinyin" title="Hanyu Pinyin">Hanyu Pinyin</a></td>
|
|
||||||
<td>Tàijíquán</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="/wiki/Wade-Giles" title="Wade-Giles">Wade-Giles</a></td>
|
|
||||||
<td>T'ai<sup>4</sup> Chi<sup>2</sup> Ch'üan<sup>2</sup></td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="/wiki/Simplified_Chinese" title="Simplified Chinese">Simplified Chinese</a></td>
|
|
||||||
<td>???</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="/wiki/Traditional_Chinese" title="Traditional Chinese">Traditional Chinese</a></td>
|
|
||||||
<td><a href="http://en.wiktionary.org/wiki/%E5%A4%AA" class="extiw" title="wiktionary:?">?</a><a href="http://en.wiktionary.org/wiki/%E6%A5%B5" class="extiw" title="wiktionary:?">?</a><a href="http://en.wiktionary.org/wiki/%E6%8B%B3" class="extiw" title="wiktionary:?">?</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="/wiki/Cantonese_%28linguistics%29" title="Cantonese (linguistics)">Cantonese</a></td>
|
|
||||||
|
|
||||||
<td>taai3 gik6 kyun4</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="/wiki/Hiragana" title="Hiragana">Japanese Hiragana</a></td>
|
|
||||||
<td>???????</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="/wiki/Korean_%28language%29" title="Korean (language)">Korean</a></td>
|
|
||||||
<td>???</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="/wiki/Vietnamese_%28language%29" title="Vietnamese (language)">Vietnamese</a></td>
|
|
||||||
|
|
||||||
<td>Thái C?c Quy?n</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<p><b>Tai Chi Chuan</b>, <b>T'ai Chi Ch'üan</b> or <b>Taijiquan</b> (<a href="/wiki/Traditional_Chinese_character" title="Traditional Chinese character">Traditional Chinese</a>: ???; <a href="/wiki/Simplified_Chinese_character" title="Simplified Chinese character">Simplified Chinese</a>: ???; <a href="/wiki/Pinyin" title="Pinyin">pinyin</a>: Tàijíquán; literally "supreme ultimate fist"), commonly known as <b>Tai Chi</b>, <b>T'ai Chi</b>, or <b><a href="/wiki/Taiji" title="Taiji">Taiji</a></b>, is an <a href="/wiki/Neijia" title="Neijia">internal</a> <a href="/wiki/Chinese_martial_arts" title="Chinese martial arts">Chinese martial art</a>. There are different styles of T'ai Chi Ch'üan, although most agree they are all based on the system originally taught by the <a href="/wiki/Chen" title="Chen">Chen</a> family to the <a href="/wiki/Yang" title="Yang">Yang</a> family starting in <a href="/wiki/1820" title="1820">1820</a>. It is often promoted and practiced as a <a href="/wiki/Martial_arts_therapy" title="Martial arts therapy">martial arts therapy</a> for the purposes of <a href="/wiki/Health" title="Health">health</a> and <a href="/wiki/Longevity" title="Longevity">longevity</a>, (some <a href="/wiki/Tai_Chi_Chuan#Citations_to_medical_research" title="Tai Chi Chuan">recent medical studies</a> support its effectiveness). T'ai Chi Ch'üan is considered a <i>soft</i> style martial art, an art applied with as complete a relaxation or "softness" in the musculature as possible, to distinguish its theory and application from that of the <i>hard</i> martial art styles which use a degree of tension in the muscles.</p>
|
|
||||||
|
|
||||||
<p>Variations of T'ai Chi Ch'üan's basic training forms are well known as the slow motion routines that groups of people practice every morning in parks across China and other parts of the world. Traditional T'ai Chi training is intended to teach awareness of one's own balance and what affects it, awareness of the same in others, an appreciation of the practical value in one's ability to moderate extremes of behavior and attitude at both mental and physical levels, and how this applies to effective self-defense principles.</p>
|
|
||||||
<table id="toc" class="toc" summary="Contents">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div id="toctitle">
|
|
||||||
<h2>Contents</h2>
|
|
||||||
</div>
|
|
||||||
<ul>
|
|
||||||
<li class="toclevel-1"><a href="#Overview"><span class="tocnumber">1</span> <span class="toctext">Overview</span></a></li>
|
|
||||||
<li class="toclevel-1"><a href="#Training_and_techniques"><span class="tocnumber">2</span> <span class="toctext">Training and techniques</span></a></li>
|
|
||||||
|
|
||||||
<li class="toclevel-1"><a href="#Styles_and_history"><span class="tocnumber">3</span> <span class="toctext">Styles and history</span></a>
|
|
||||||
<ul>
|
|
||||||
<li class="toclevel-2"><a href="#Family_tree"><span class="tocnumber">3.1</span> <span class="toctext">Family tree</span></a></li>
|
|
||||||
<li class="toclevel-2"><a href="#Notes_to_Family_tree_table"><span class="tocnumber">3.2</span> <span class="toctext">Notes to Family tree table</span></a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="toclevel-1"><a href="#Modern_T.27ai_Chi"><span class="tocnumber">4</span> <span class="toctext">Modern T'ai Chi</span></a>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li class="toclevel-2"><a href="#Modern_forms"><span class="tocnumber">4.1</span> <span class="toctext">Modern forms</span></a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="toclevel-1"><a href="#Health_benefits"><span class="tocnumber">5</span> <span class="toctext">Health benefits</span></a>
|
|
||||||
<ul>
|
|
||||||
<li class="toclevel-2"><a href="#Citations_to_medical_research"><span class="tocnumber">5.1</span> <span class="toctext">Citations to medical research</span></a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li class="toclevel-1"><a href="#See_also"><span class="tocnumber">6</span> <span class="toctext">See also</span></a></li>
|
|
||||||
<li class="toclevel-1"><a href="#External_links"><span class="tocnumber">7</span> <span class="toctext">External links</span></a></li>
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<p><script type="text/javascript">
|
|
||||||
//<![CDATA[
|
|
||||||
if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); }
|
|
||||||
//]]>
|
|
||||||
</script></p>
|
|
||||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="/w/index.php?title=Tai_Chi_Chuan&action=edit&section=1" title="Edit section: Overview">edit</a>]</div>
|
|
||||||
|
|
||||||
<p><a name="Overview" id="Overview"></a></p>
|
|
||||||
<h2>Overview</h2>
|
|
||||||
<p>Historically, T'ai Chi Ch'üan has been regarded as a martial art, and its traditional practitioners still teach it as one. Even so, it has developed a worldwide following among many thousands of people with little or no interest in martial training for its aforementioned benefits to health and <a href="/wiki/Preventive_medicine" title="Preventive medicine">health maintenance</a>. Some call it a form of moving <a href="/wiki/Meditation" title="Meditation">meditation</a>, and T'ai Chi theory and practice evolved in agreement with many of the principles of <a href="/wiki/Traditional_Chinese_medicine" title="Traditional Chinese medicine">traditional Chinese medicine</a>. Besides general health benefits and <a href="/wiki/Stress_management" title="Stress management">stress management</a> attributed to beginning and intermediate level T'ai Chi training, many therapeutic interventions along the lines of traditional Chinese medicine are taught to advanced T'ai Chi students.</p>
|
|
||||||
<p>T'ai Chi Ch'üan as physical training is characterized by its requirement for the use of leverage through the joints based on coordination in relaxation rather than muscular tension in order to neutralize or initiate physical attacks. The slow, repetitive work involved in that process is said to gently increase and open the internal circulation (<a href="/wiki/Breath" title="Breath">breath</a>, body heat, <a href="/wiki/Blood" title="Blood">blood</a>, <a href="/wiki/Lymph" title="Lymph">lymph</a>, <a href="/wiki/Peristalsis" title="Peristalsis">peristalsis</a>, etc.). Over time, proponents say, this enhancement becomes a lasting effect, a direct reversal of the constricting physical effects of stress on the human body. This reversal allows much more of the students' native energy to be available to them, which they may then apply more effectively to the rest of their lives; families, careers, spiritual or creative pursuits, hobbies, etc.</p>
|
|
||||||
|
|
||||||
<p>The study of T'ai Chi Ch'üan involves three primary subjects:</p>
|
|
||||||
<ul>
|
|
||||||
<li><b>Health</b> - an unhealthy or otherwise uncomfortable person will find it difficult to meditate to a state of calmness or to use T'ai Chi as a martial art. T'ai Chi's health training therefore concentrates on relieving the physical effects of stress on the body and mind.</li>
|
|
||||||
<li><b>Meditation</b> - the focus meditation and subsequent calmness cultivated by the meditative aspect of T'ai Chi is seen as necessary to maintain optimum health (in the sense of effectively maintaining stress relief or <a href="/wiki/Homeostasis" title="Homeostasis">homeostasis</a>) and in order to use it as a soft style martial art.</li>
|
|
||||||
<li><b>Martial art</b> - the ability to competently use T'ai Chi as a martial art is said to be proof that the health and meditation aspects are working according to the dictates of the theory of T'ai Chi Ch'üan.</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<p>In its traditional form (many modern variations exist which ignore at least one of the above requirements) every aspect of its training has to conform with all three of the aforementioned categories.</p>
|
|
||||||
<p>The <a href="/wiki/Mandarin_%28linguistics%29" title="Mandarin (linguistics)">Mandarin</a> term "T'ai Chi Ch'üan" translates as "Supreme Ultimate Boxing" or "Boundless Fist". T'ai Chi training involves learning solo routines, known as <i>forms</i>, and two person routines, known as <i><a href="/wiki/Pushing_hands" title="Pushing hands">pushing hands</a></i>, as well as <i><a href="/wiki/Acupressure" title="Acupressure">acupressure</a></i>-related manipulations taught by traditional schools. T'ai Chi Ch'üan is seen by many of its schools as a variety of <a href="/wiki/Taoism" title="Taoism">Taoism</a>, and it does seemingly incorporate many Taoist principles into its practice (see below). It is an art form said to date back many centuries (although not reliably documented under that name before 1850), with precursor disciplines dating back thousands of years. The explanation given by the traditional T'ai Chi family schools for why so many of their previous generations have dedicated their lives to the study and preservation of the art is that the discipline it seems to give its students to dramatically improve the effects of stress in their lives, with a few years of hard work, should hold a useful purpose for people living in a stressful world. They say that once the T'ai Chi principles have been understood and internalized into the bodily framework the practitioner will have an immediately accessible "toolkit" thereby to improve and then maintain their health, to provide a meditative focus, and that can work as an effective and subtle martial art for self-defense.</p>
|
|
||||||
<p>Teachers say the study of T'ai Chi Ch'üan is, more than anything else, about challenging one's ability to change oneself appropriately in response to outside forces. These principles are taught using the examples of <a href="/wiki/Physics" title="Physics">physics</a> as experienced by two (or more) bodies in <a href="/wiki/Combat" title="Combat">combat</a>. In order to be able to protect oneself or someone else by using change, it is necessary to understand what the consequences are of changing appropriately, changing inappropriately and not changing at all in response to an attack. Students, by this theory, will appreciate the full benefits of the entire art in the fastest way through physical training of the martial art aspect.</p>
|
|
||||||
|
|
||||||
<p><a href="/wiki/Wu_Chien-ch%27uan" title="Wu Chien-ch'uan">Wu Chien-ch'üan</a>, co-founder of the Wu family style, described the name <i>T'ai Chi Ch'üan</i> this way at the beginning of the <a href="/wiki/20th_century" title="20th century">20th century</a>:</p>
|
|
||||||
<dl>
|
|
||||||
<dd>"Various people have offered different explanations for the name <i>T'ai Chi Ch'uan</i>. Some have said: 'In terms of self-cultivation, one must train from a state of movement towards a state of stillness. <i>T'ai Chi</i> comes about through the balance of <i><a href="/wiki/Yin" title="Yin">yin</a></i> and <i><a href="/wiki/Yang" title="Yang">yang</a></i>. In terms of the art of attack and defense then, in the context of the <a href="/wiki/I_Ching" title="I Ching">changes</a> of full and empty, one is constantly internally latent, not outwardly expressive, as if the <i>yin</i> and <i>yang</i> of <i>T'ai Chi</i> have not yet divided apart.'</dd>
|
|
||||||
|
|
||||||
<dd>Others say: 'Every movement of <i>T'ai Chi Ch'uan</i> is based on circles, just like the shape of a <a href="/wiki/Taijitu" title="Taijitu"><i>T'ai Chi</i> symbol</a>. Therefore, it is called <i>T'ai Chi Ch'uan</i>.' Both explanations are quite reasonable, especially the second, which is more complete."</dd>
|
|
||||||
</dl>
|
|
||||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="/w/index.php?title=Tai_Chi_Chuan&action=edit&section=2" title="Edit section: Training and techniques">edit</a>]</div>
|
|
||||||
<p><a name="Training_and_techniques" id="Training_and_techniques"></a></p>
|
|
||||||
|
|
||||||
<h2>Training and techniques</h2>
|
|
||||||
<div class="thumb tright">
|
|
||||||
<div style="width:182px;"><a href="/wiki/Image:Yin_yang.svg" class="internal" title="The T'ai Chi Symbol or T'ai Chi T'u (Taijitu)"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Yin_yang.svg/180px-Yin_yang.svg.png" alt="The T'ai Chi Symbol or T'ai Chi T'u (Taijitu)" width="180" height="180" longdesc="/wiki/Image:Yin_yang.svg" /></a>
|
|
||||||
<div class="thumbcaption">
|
|
||||||
<div class="magnify" style="float:right"><a href="/wiki/Image:Yin_yang.svg" class="internal" title="Enlarge"><img src="/skins-1.5/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div>
|
|
||||||
<b>The T'ai Chi Symbol or T'ai Chi T'u (Taijitu)</b></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p>As the name <i>T'ai Chi Ch'üan</i> is held to be derived from the T'ai Chi symbol, the <i>taijitu</i> or <i>t'ai chi t'u</i> (???, <a href="/wiki/Pinyin" title="Pinyin">pinyin</a> tàijítú), commonly known in the West as the "<a href="/wiki/Yin-yang" title="Yin-yang">yin-yang</a>" diagram, T'ai Chi Ch'üan techniques are said therefore to physically and energetically balance <i>yin</i> (receptive) and <i>yang</i> (active) principles: "From ultimate softness comes ultimate hardness."</p>
|
|
||||||
|
|
||||||
<p>The core training involves two primary features: the first being the solo form or <i>ch'üan</i>, a slow sequence of movements which emphasize a straight spine, relaxed breathing and a natural range of motion; the second being different styles of <i>pushing hands</i> or <i>t'ui shou</i> (??) for training "stickiness" and sensitivity in the reflexes through various motions from the forms in concert with a training partner in order to learn leverage, timing, coordination and positioning when interacting with another. Pushing hands is seen as necessary not only for training the self-defense skills of a soft style such as T'ai Chi by demonstrating the forms' movement principles experientially, but also it is said to improve upon the level of conditioning provided by practice of the solo forms by increasing the workload on students while they practice those movement principles.</p>
|
|
||||||
<p>The solo form should take the students through a complete, natural, range of motion over their centre of gravity. Accurate, repeated practice of the solo routine is said to retrain posture, encourage circulation throughout the students' bodies, maintain flexibility through their joints and further familiarize students with the martial application sequences implied by the forms. The major traditional styles of T'ai Chi have forms which differ somewhat cosmetically, but there are also many obvious similarities which point to their common origin. The solo forms, empty-hand and <a href="/wiki/Weapon" title="Weapon">weapon</a>, are catalogues of movements that are practised individually in pushing hands and martial application scenarios to prepare students for self-defence training. In most traditional schools different variations of the solo forms can be practiced; fast/slow, small circle/large circle, square/round (which are different expressions of leverage through the joints), low sitting/high sitting (the degree to which weight-bearing knees are kept bent throughout the form), for example.</p>
|
|
||||||
<p>In a fight, if one uses hardness to resist violent force then both sides are certain to be injured, at least to some degree. Such injury, according to T'ai Chi theory, is a natural consequence of meeting brute force with brute force. The collision of two like forces, yang with yang, is known as "double-weighted" in T'ai Chi terminology. Instead, students are taught not to fight or resist an incoming force, but to meet it in softness and "stick" to it, following its motion while remaining in physical contact until the incoming force of attack exhausts itself or can be safely redirected, the result of meeting yang with yin. Done correctly, achieving this yin/yang or yang/yin balance in combat (and, by extension, other areas of one's life) is known as being "single-weighted" and is a primary goal of T'ai Chi Ch'üan training. <a href="/wiki/Lao_Tzu" title="Lao Tzu">Lao Tzu</a> provided the <a href="/wiki/Archetype" title="Archetype">archetype</a> for this in the <a href="/wiki/Tao_Te_Ching" title="Tao Te Ching">Tao Te Ching</a> when he wrote, "The soft and the pliable will defeat the hard and strong." This soft "neutralization" of an attack can be accomplished very quickly in an actual fight by an adept practitioner. A T'ai Chi student has to be well conditioned by many years of disciplined training; stable, sensitive and elastic mentally and physically in order to realize this ability, however.</p>
|
|
||||||
|
|
||||||
<p>Other training exercises include:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Weapons training and <a href="/wiki/Fencing" title="Fencing">fencing</a> applications employing the straight <i><a href="/wiki/Sword" title="Sword">sword</a></i> known as the <i>jian</i> or <i>chien</i> or <i>gim</i> (<a href="/wiki/Jian" title="Jian">jiàn</a> ?), a heavier curved <i>sabre</i>, sometimes called a <i>broadsword</i> or <i>tao</i> (<a href="/wiki/Dao_%28saber%29" title="Dao (saber)">dao</a> ?, which is actually considered a big <i><a href="/wiki/Knife" title="Knife">knife</a></i>), folding <i><a href="/wiki/Tessen" title="Tessen">fan</a></i>, <i>staff</i> (?), 7 foot (2 m) <i><a href="/wiki/Qiang_%28spear%29" title="Qiang (spear)">spear</a></i> and 13 foot (4 m) <i><a href="/wiki/Lance" title="Lance">lance</a></i> (both called qiang ?). More exotic weapons still used by some traditional styles are the large <i>Da Dao</i> or <i>Ta Tao</i> (??) sabre, <i><a href="/wiki/Ji_%28halberd%29" title="Ji (halberd)">halberd</a></i> (ji ?), <i>cane</i>, <i>rope-dart</i>, <i><a href="/wiki/Three_sectional_staff" title="Three sectional staff">three sectional staff</a></i>, <i><a href="/wiki/Lasso" title="Lasso">lasso</a></i>, <i><a href="/wiki/Whip" title="Whip">whip</a></i>, <i><a href="/wiki/Chain_whip" title="Chain whip">chain whip</a></i> and <i>steel whip</i>.</li>
|
|
||||||
|
|
||||||
<li>Two-person tournament sparring (as part of push hands competitions and/or <i><a href="/wiki/San_shou" title="San shou">san shou</a></i> ??);</li>
|
|
||||||
<li>Breathing exercises; <i><a href="/wiki/Nei_kung" title="Nei kung">nei kung</a></i> (?? nèigong) or, more commonly, <i><a href="/wiki/Ch%27i_kung" title="Ch'i kung">ch'i kung</a></i> (?? qìgong) to develop <b><a href="/wiki/Ch%27i" title="Ch'i">ch'i</a></b> (? qì) or "breath energy" in coordination with physical movement and <a href="/wiki/Zhan_zhuang" title="Zhan zhuang">post standing</a> or combinations of the two. These were formerly taught only to disciples as a separate, complementary training system. In the last 50 years they have become more well known to the general public.</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<p>T'ai Chi's martial aspect relies on sensitivity to the opponent's movements and centre of gravity dictating appropriate responses. Effectively affecting or "capturing" the opponent's centre of gravity immediately upon contact is trained as the primary goal of the martial T'ai Chi student, and from there all other technique can follow with seeming effortlessness. The alert calmness required to achieve the necessary sensitivity is acquired over thousands of hours of first <i>yin</i> (slow, repetitive, meditative, low impact) and then later adding <i>yang</i> ("realistic," active, fast, high impact) martial training; forms, pushing hands and sparring. T'ai Chi Ch'üan trains in three basic ranges, close, medium and long, and then everything in between. Pushes and open hand strikes are more common than punches, and kicks are usually to the legs and lower torso, never higher than the hip in most styles. The fingers, fists, palms, sides of the hands, wrists, forearms, elbows, shoulders, back, hips, knees and feet are commonly used to strike, with strikes to the eyes, throat, heart, groin and other acupressure points trained by advanced students. There is an extensive repertoire of joint traps, locks and breaks (<a href="/wiki/Chin_na" title="Chin na">chin na</a>), particularly applied to lock up or break an opponent's elbows, wrists, fingers, ankles, back or neck. Most T'ai Chi teachers expect their students to thoroughly learn defensive or neutralizing skills first, and a student will have to demonstrate proficiency with them before offensive skills will be extensively trained. There is also an emphasis in the traditional schools on kind-heartedness. One is expected to show mercy to one's opponents, as instanced by a poem preserved in some of the T'ai Chi families said to be derived from the <a href="/wiki/Shaolin" title="Shaolin">Shaolin</a> temple:</p>
|
|
||||||
<dl>
|
|
||||||
<dd>"I would rather maim than kill</dd>
|
|
||||||
|
|
||||||
<dd>Hurt than maim</dd>
|
|
||||||
<dd>Intimidate than hurt</dd>
|
|
||||||
<dd>Avoid than intimidate."</dd>
|
|
||||||
</dl>
|
|
||||||
<div class="thumb tright">
|
|
||||||
<div style="width:352px;"><a href="/wiki/Image:Martial_arts_-_Fragrant_Hills.JPG" class="internal" title="An outdoor Chen style class in Beijing"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Martial_arts_-_Fragrant_Hills.JPG/350px-Martial_arts_-_Fragrant_Hills.JPG" alt="An outdoor Chen style class in Beijing" width="350" height="233" longdesc="/wiki/Image:Martial_arts_-_Fragrant_Hills.JPG" /></a>
|
|
||||||
<div class="thumbcaption">
|
|
||||||
<div class="magnify" style="float:right"><a href="/wiki/Image:Martial_arts_-_Fragrant_Hills.JPG" class="internal" title="Enlarge"><img src="/skins-1.5/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div>
|
|
||||||
An outdoor Chen style class in Beijing</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="/w/index.php?title=Tai_Chi_Chuan&action=edit&section=3" title="Edit section: Styles and history">edit</a>]</div>
|
|
||||||
|
|
||||||
<p><a name="Styles_and_history" id="Styles_and_history"></a></p>
|
|
||||||
<h2>Styles and history</h2>
|
|
||||||
<p>There are five major styles of T'ai Chi Ch'üan, each named after the Chinese family that teaches (or taught) it:</p>
|
|
||||||
<ul>
|
|
||||||
<li><b><a href="/wiki/Chen_style_Tai_Chi_Chuan" title="Chen style Tai Chi Chuan">Chen style</a></b> (??) and its close cousin <b><a href="/w/index.php?title=Zhaobao_style_T%27ai_Chi_Ch%27uan&action=edit" class="new" title="Zhaobao style T'ai Chi Ch'uan">Zhao Bao Style</a></b> (?????)</li>
|
|
||||||
<li><b><a href="/wiki/Yang_style_T%27ai_Chi_Ch%27uan" title="Yang style T'ai Chi Ch'uan">Yang style</a></b> (??)</li>
|
|
||||||
|
|
||||||
<li><b><a href="/wiki/Wu/Hao_style_T%27ai_Chi_Ch%27uan" title="Wu/Hao style T'ai Chi Ch'uan">Wu or Wu/Hao style of Wu Yu-hsiang</a></b> (??)</li>
|
|
||||||
<li><b><a href="/wiki/Wu_style_T%27ai_Chi_Ch%27uan" title="Wu style T'ai Chi Ch'uan">Wu style of Wu Ch'uan-yü and Wu Chien-ch'uan</a></b> (??)</li>
|
|
||||||
<li><b><a href="/wiki/Sun_style_T%27ai_Chi_Ch%27uan" title="Sun style T'ai Chi Ch'uan">Sun style</a></b> (??)</li>
|
|
||||||
</ul>
|
|
||||||
<p>The order of seniority is as listed above. The order of popularity is Yang, Wu, Chen, Sun, and Wu/Hao. The first five major family styles share much underlying theory, but differ in their approaches to training.</p>
|
|
||||||
<p>In the modern world there are now dozens of new styles, hybrid styles and offshoots of the main styles, but the five family schools are the groups recognised by the international community as being orthodox. For example, there are <i>several</i> groups teaching what they call <a href="/wiki/Wudang_Tai_Chi_Chuan" title="Wudang Tai Chi Chuan">Wu Tang style T'ai Chi Ch'üan (??????)</a>. The best known modern style going by the name <i>Wu Tang</i> has gained some publicity internationally, especially in the <a href="/wiki/United_Kingdom" title="United Kingdom">UK</a> and <a href="/wiki/Europe" title="Europe">Europe</a>, but was originally taught by a senior student of the Wu (?) style.</p>
|
|
||||||
|
|
||||||
<p>The designation <i><a href="/wiki/Wudangquan" title="Wudangquan">Wu Tang Ch'üan</a></i> is also used to broadly distinguish <i>internal</i> or <i>nei chia</i> martial arts (said to be a specialty of the <a href="/wiki/Monasteries" title="Monasteries">monasteries</a> at <a href="/wiki/Wudangshan" title="Wudangshan">Wu Tang Shan</a>) from what are known as the <i>external</i> or <i>wei chia</i> styles based on <i><a href="/w/index.php?title=Shaolinquan_kung_fu&action=edit" class="new" title="Shaolinquan kung fu">Shaolinquan kung fu</a></i>, although that distinction is sometimes disputed by individual schools. In this broad sense, among many T'ai Chi schools <i>all</i> styles of T'ai Chi (as well as related arts such as <a href="/wiki/Bagua_zhang" title="Bagua zhang">Pa Kua Chang</a> and <a href="/wiki/Hsing_Yi" title="Hsing Yi">Hsing-i Ch'üan</a>) are therefore considered to be "Wu Tang style" martial arts. The schools that designate themselves "Wu Tang style" relative to the family styles mentioned above mostly claim to teach an "original style" they say was formulated by a Taoist monk called <a href="/wiki/Zhang_Sanfeng" title="Zhang Sanfeng">Zhang Sanfeng</a> and taught by him in the Taoist monasteries at Wu Tang Shan. Some consider that what is practised under that name today may be a modern back-formation based on stories and popular veneration of Zhang Sanfeng (see below) as well as the martial fame of the Wu Tang monastery (there are many other martial art styles historically associated with Wu Tang besides T'ai Chi).</p>
|
|
||||||
|
|
||||||
<p>When tracing T'ai Chi Ch'üan's formative influences to <a href="/wiki/Taoist" title="Taoist">Taoist</a> and <a href="/wiki/Buddhist" title="Buddhist">Buddhist</a> monasteries, one has little more to go on than legendary tales from a modern historical perspective, but T'ai Chi Ch'üan's practical connection to and dependence upon the theories of <a href="/wiki/Song_dynasty" title="Song dynasty">Sung dynasty</a> <a href="/wiki/Neo-Confucianism" title="Neo-Confucianism">Neo-Confucianism</a> (a conscious synthesis of Taoist, Buddhist and <a href="/wiki/Confucian" title="Confucian">Confucian</a> traditions, esp. the teachings of <a href="/wiki/Mencius" title="Mencius">Mencius</a>) is readily apparent to its practitioners. The philosophical and political landscape of that time in Chinese history is fairly well documented, even if the origin of the art later to become known as T'ai Chi Ch'üan in it is not. T'ai Chi Ch'üan's theories and practice are therefore believed by some schools to have been formulated by the Taoist monk <a href="/wiki/Zhang_Sanfeng" title="Zhang Sanfeng">Zhang Sanfeng</a> in the 12th century, a time frame fitting well with when the principles of the Neo-Confucian school were making themselves felt in Chinese intellectual life. Therefore the didactic story is told that Zhang Sanfeng as a young man studied <a href="/wiki/Tao_Yin" title="Tao Yin">Tao Yin</a> (??, <a href="/wiki/Pinyin" title="Pinyin">Pinyin</a> daoyin) breathing exercises from his Taoist teachers and martial arts at the Buddhist Shaolin monastery, eventually combining the martial forms and breathing exercises to formulate the soft or internal principles we associate with T'ai Chi Ch'üan and related martial arts. Its subsequent fame attributed to his teaching, Wu Tang monastery was known thereafter as an important martial center for many centuries, its many styles of internal <a href="/wiki/Kung_fu" title="Kung fu">kung fu</a> preserved and refined at various Taoist temples.</p>
|
|
||||||
|
|
||||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="/w/index.php?title=Tai_Chi_Chuan&action=edit&section=4" title="Edit section: Family tree">edit</a>]</div>
|
|
||||||
<p><a name="Family_tree" id="Family_tree"></a></p>
|
|
||||||
<h3>Family tree</h3>
|
|
||||||
<p>This family tree is not comprehensive.</p>
|
|
||||||
<pre>
|
|
||||||
<b>LEGENDARY FIGURES</b>
|
|
||||||
|
|
|
||||||
<a href="/wiki/Zhang_Sanfeng" title="Zhang Sanfeng">Zhang Sanfeng</a>*
|
|
||||||
circa 12th century
|
|
||||||
<a href="/wiki/Nei_chia" title="Nei chia">NEI CHIA</a>
|
|
||||||
|
|
||||||
|
|
|
||||||
<a href="/w/index.php?title=Wang_Zongyue&action=edit" class="new" title="Wang Zongyue">Wang Zongyue</a>*
|
|
||||||
T'AI CHI CH'ÜAN
|
|
||||||
|
|
|
||||||
<b>THE 5 MAJOR CLASSICAL FAMILY STYLES</b>
|
|
||||||
|
|
|
||||||
Chen Wangting
|
|
||||||
1600-1680 9th generation Chen
|
|
||||||
<a href="/wiki/Chen_style_Tai_Chi_Chuan" title="Chen style Tai Chi Chuan">CHEN STYLE</a>
|
|
||||||
|
|
|
||||||
+-------------------------------------------------------------------+
|
|
||||||
| |
|
|
||||||
<a href="/w/index.php?title=Chen_Changxing&action=edit" class="new" title="Chen Changxing">Chen Changxing</a> <a href="/w/index.php?title=Chen_Youben&action=edit" class="new" title="Chen Youben">Chen Youben</a>
|
|
||||||
1771-1853 14th generation Chen circa 1800s 14th generation Chen
|
|
||||||
Chen Old Frame Chen New Frame
|
|
||||||
| |
|
|
||||||
|
|
||||||
<a href="/wiki/Yang_Lu-ch%27an" title="Yang Lu-ch'an">Yang Lu-ch'an</a> <a href="/w/index.php?title=Chen_Qingping&action=edit" class="new" title="Chen Qingping">Chen Qingping</a>
|
|
||||||
1799-1872 1795-1868
|
|
||||||
<a href="/wiki/Yang_style_Tai_Chi_Chuan" title="Yang style Tai Chi Chuan">YANG STYLE</a> Chen Small Frame, Zhao Bao Frame
|
|
||||||
| |
|
|
||||||
+---------------------------------+-----------------------------+ |
|
|
||||||
| | | |
|
|
||||||
<a href="/wiki/Yang_Pan-hou" title="Yang Pan-hou">Yang Pan-hou</a> <a href="/wiki/Yang_Chien-hou" title="Yang Chien-hou">Yang Chien-hou</a> <a href="/w/index.php?title=Wu_Yu-hsiang&action=edit" class="new" title="Wu Yu-hsiang">Wu Yu-hsiang</a>
|
|
||||||
1837-1892 1839-1917 1812-1880
|
|
||||||
Yang Small Frame | <a href="/wiki/Wu/Hao_style_T%27ai_Chi_Ch%27uan" title="Wu/Hao style T'ai Chi Ch'uan">WU/HAO STYLE</a>
|
|
||||||
|
|
||||||
| +-----------------+ |
|
|
||||||
| | | |
|
|
||||||
<a href="/wiki/Wu_Ch%27uan-y%C3%BC" title="Wu Ch'uan-yü">Wu Ch'uan-yü</a> <a href="/wiki/Yang_Shao-hou" title="Yang Shao-hou">Yang Shao-hou</a> <a href="/wiki/Yang_Ch%27eng-fu" title="Yang Ch'eng-fu">Yang Ch'eng-fu</a> <a href="/w/index.php?title=Li_I-y%C3%BC&action=edit" class="new" title="Li I-yü">Li I-yü</a>
|
|
||||||
1834-1902 1862-1930 1883-1936 1832-1892
|
|
||||||
| Yang Small Frame <a href="/wiki/103_form_Yang_family_T%27ai_Chi_Ch%27uan" title="103 form Yang family T'ai Chi Ch'uan">Yang Big Frame</a> |
|
|
||||||
<a href="/wiki/Wu_Chien-ch%27%C3%BCan" title="Wu Chien-ch'üan">Wu Chien-ch'üan</a> | <a href="/wiki/Hao_Wei-chen" title="Hao Wei-chen">Hao Wei-chen</a>
|
|
||||||
|
|
||||||
1870-1942 <a href="/wiki/Yang_Shou-chung" title="Yang Shou-chung">Yang Shou-chung</a> 1849-1920
|
|
||||||
<a href="/wiki/Wu_style_T%27ai_Chi_Ch%27uan" title="Wu style T'ai Chi Ch'uan">WU STYLE</a> 1910-1985 |
|
|
||||||
<a href="/wiki/108_form_Wu_family_T%27ai_Chi_Ch%27uan" title="108 form Wu family T'ai Chi Ch'uan">108 Form</a> |
|
|
||||||
| <a href="/wiki/Sun_Lu-t%27ang" title="Sun Lu-t'ang">Sun Lu-t'ang</a>
|
|
||||||
<a href="/wiki/Wu_Kung-i" title="Wu Kung-i">Wu Kung-i</a> 1861-1932
|
|
||||||
1900-1970 <a href="/wiki/Sun_style_T%27ai_Chi_Ch%27uan" title="Sun style T'ai Chi Ch'uan">SUN STYLE</a>
|
|
||||||
|
|
||||||
| |
|
|
||||||
<a href="/w/index.php?title=Wu_Ta-kuei&action=edit" class="new" title="Wu Ta-kuei">Wu Ta-kuei</a> <a href="/w/index.php?title=Sun_Hsing-i&action=edit" class="new" title="Sun Hsing-i">Sun Hsing-i</a>
|
|
||||||
1923-1970 1891-1929
|
|
||||||
|
|
||||||
<b>MODERN FORMS</b>
|
|
||||||
|
|
||||||
from Yang Ch`eng-fu
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
+--------------+
|
|
||||||
| |
|
|
||||||
<a href="/wiki/Cheng_Man-ch%27ing" title="Cheng Man-ch'ing">Cheng Man-ch'ing</a> |
|
|
||||||
1901-1975 |
|
|
||||||
Short (37) Form |
|
|
||||||
|
|
|
||||||
Chinese Sports Commission
|
|
||||||
1956
|
|
||||||
Beijing <a href="/wiki/24_Form" title="24 Form">24 Form</a>
|
|
||||||
.
|
|
||||||
.
|
|
||||||
1989
|
|
||||||
<a href="/wiki/42_Form_%28Competition_Form%29_T%27ai_Chi_Ch%27uan" title="42 Form (Competition Form) T'ai Chi Ch'uan">42 Competition Form</a>
|
|
||||||
|
|
||||||
(<a href="/wiki/Wushu" title="Wushu">Wushu</a> competition form combined from Sun, Wu, Chen, and Yang styles)
|
|
||||||
</pre>
|
|
||||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="/w/index.php?title=Tai_Chi_Chuan&action=edit&section=5" title="Edit section: Notes to Family tree table">edit</a>]</div>
|
|
||||||
<p><a name="Notes_to_Family_tree_table" id="Notes_to_Family_tree_table"></a></p>
|
|
||||||
<h3>Notes to Family tree table</h3>
|
|
||||||
<p>Names denoted by an asterisk are legendary or semilegendary figures in the lineage, which means their involvement in the lineage, while accepted by most of the major schools, isn't independently verifiable from known historical records.</p>
|
|
||||||
<p>The Cheng Man-ch'ing and <a href="/w/index.php?title=Chinese_Sports_Commission&action=edit" class="new" title="Chinese Sports Commission">Chinese Sports Commission</a> short forms are said to be derived from Yang family forms, but neither are recognized as Yang family T'ai Chi Ch'üan by current Yang family teachers. The Chen, Yang and Wu families are now promoting their own shortened demonstration forms for competitive purposes.</p>
|
|
||||||
|
|
||||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="/w/index.php?title=Tai_Chi_Chuan&action=edit&section=6" title="Edit section: Modern T'ai Chi">edit</a>]</div>
|
|
||||||
<p><a name="Modern_T.27ai_Chi" id="Modern_T.27ai_Chi"></a></p>
|
|
||||||
<h2>Modern T'ai Chi</h2>
|
|
||||||
<div class="thumb tright">
|
|
||||||
<div style="width:352px;"><a href="/wiki/Image:Taichi_shanghai_bund_2005.jpg" class="internal" title="Yang style in Shanghai"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Taichi_shanghai_bund_2005.jpg/350px-Taichi_shanghai_bund_2005.jpg" alt="Yang style in Shanghai" width="350" height="263" longdesc="/wiki/Image:Taichi_shanghai_bund_2005.jpg" /></a>
|
|
||||||
<div class="thumbcaption">
|
|
||||||
<div class="magnify" style="float:right"><a href="/wiki/Image:Taichi_shanghai_bund_2005.jpg" class="internal" title="Enlarge"><img src="/skins-1.5/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div>
|
|
||||||
Yang style in Shanghai</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p>T'ai Chi has become very popular in the last twenty years or so, as the <a href="/wiki/Baby_boomers" title="Baby boomers">baby boomers</a> age and T'ai Chi's reputation for ameliorating the effects of aging becomes more well-known. Hospitals, clinics, community and senior centers are all hosting T'ai Chi classes in communities around the world. As a result of this popularity, there has been some divergence between those who say they practice T'ai Chi primarily for fighting, those who practice it for its <a href="/wiki/Aesthetic" title="Aesthetic">aesthetic</a> appeal (as in the shortened, modern, theatrical "Taijiquan" forms of <a href="/wiki/Wushu" title="Wushu">wushu</a>, see below), and those who are more interested in its benefits to physical and mental health. The wushu aspect is primarily for show; the forms taught for those purposes are designed to earn points in competition and are mostly unconcerned with either health maintenance or martial ability. More traditional stylists still see the two aspects of health and martial arts as equally necessary pieces of the puzzle, the <i>yin</i> and <i>yang</i> of T'ai Chi Ch'üan. The T'ai Chi "family" schools therefore still present their teachings in a martial art context even though the majority of their students nowadays profess that they are primarily interested in training for the claimed health benefits.</p>
|
|
||||||
|
|
||||||
<p>Along with <a href="/wiki/Yoga" title="Yoga">Yoga</a>, it is one of the fastest growing fitness and health maintenance activities, in terms of numbers of students enrolling in classes. Since there is no universal certification process and most Westerners haven't seen very much T'ai Chi and don't know what to look for, practically anyone can learn or even make up a few moves and call themselves a teacher. This is especially prevalent in the <a href="/wiki/New_Age" title="New Age">New Age</a> community. Relatively few of these teachers even know that there are martial applications to the T'ai Chi forms. Those who do know that it is a martial art usually don't teach martially themselves. If they do teach self-defense, it is often a mixture of motions which the teachers think look like T'ai Chi Ch'üan with some other system. This is especially evident in schools located outside of China. While this phenomenon may have made some external aspects of T'ai Chi available for a wider audience, the traditional T'ai Chi family schools see the martial focus as a fundamental part of their training, both for health <i>and</i> self-defense purposes. They claim that while the students may not need to practice martial applications themselves to derive a benefit from T'ai Chi training, they assert that T'ai Chi teachers at least should know the martial applications to ensure that the movements they teach are done correctly and safely by their students. Also, working on the ability to protect oneself from physical attack (one of the most stressful things that can happen to a person) certainly falls under the category of complete "health maintenance." For these reasons they claim that a school not teaching those aspects somewhere in their syllabus cannot be said to be actually teaching the art itself, and will be much less likely to be able to reproduce the full health benefits that made T'ai Chi's reputation in the first place.</p>
|
|
||||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="/w/index.php?title=Tai_Chi_Chuan&action=edit&section=7" title="Edit section: Modern forms">edit</a>]</div>
|
|
||||||
<p><a name="Modern_forms" id="Modern_forms"></a></p>
|
|
||||||
<h3>Modern forms</h3>
|
|
||||||
|
|
||||||
<div class="thumb tright">
|
|
||||||
<div style="width:352px;"><a href="/wiki/Image:Tai_Chi_fans.jpg" class="internal" title="Women practicing non-martial T'ai Chi in Chinatown (New York City, New York, USA)."><img src="http://upload.wikimedia.org/wikipedia/en/thumb/a/ad/Tai_Chi_fans.jpg/350px-Tai_Chi_fans.jpg" alt="Women practicing non-martial T'ai Chi in Chinatown (New York City, New York, USA)." width="350" height="201" longdesc="/wiki/Image:Tai_Chi_fans.jpg" /></a>
|
|
||||||
<div class="thumbcaption">
|
|
||||||
<div class="magnify" style="float:right"><a href="/wiki/Image:Tai_Chi_fans.jpg" class="internal" title="Enlarge"><img src="/skins-1.5/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div>
|
|
||||||
Women practicing non-martial T'ai Chi in <a href="/wiki/Chinatown_%28Manhattan%29" title="Chinatown (Manhattan)">Chinatown</a> (<a href="/wiki/New_York_City" title="New York City">New York City</a>, <a href="/wiki/New_York" title="New York">New York</a>, <a href="/wiki/USA" title="USA">USA</a>).</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>In order to standardize T'ai Chi Ch'üan for wushu tournament judging, and because many of the family T'ai Chi Ch'üan teachers had either moved out of China or had been forced to stop teaching after the <a href="/wiki/Chinese_Civil_War" title="Chinese Civil War">Communist regime was established</a> in <a href="/wiki/1949" title="1949">1949</a>, the government sponsored Chinese Sports Committee brought together four of their wushu teachers to truncate the Yang family hand form to <a href="/wiki/24_Form_%28Simplified_Form%29_T%27ai_Chi_Ch%27uan" title="24 Form (Simplified Form) T'ai Chi Ch'uan">24 postures</a> in <a href="/wiki/1956" title="1956">1956</a>. They wanted to somehow retain the look of T'ai Chi Ch'üan but make an easy to remember routine that was less difficult to teach and much less difficult to learn than longer (generally 88 to 108 posture) classical solo hand forms. In <a href="/wiki/1976" title="1976">1976</a>, they developed a slightly longer form also for the purposes of demonstration that still didn't involve the complete memory, balance and coordination requirements of the traditional forms. This was a combination form, the <i>Combined 48 Forms</i> that were created by three wushu coaches headed by Professor Men Hui Feng. The combined forms were created based on simplifying and combining some features of the classical forms from four of the original styles; Ch'en, Yang, Wu, and Sun. Even though shorter modern forms don't have the conditioning benefits of the classical forms, the idea was to take what they felt were distinctive cosmetic features of these styles and to express them in a shorter time for purposes of competition.</p>
|
|
||||||
|
|
||||||
<p>As T'ai Chi again became popular on the Mainland, competitive forms were developed to be completed within a 6 minute time limit. In the late <a href="/wiki/1980s" title="1980s">1980s</a>, the Chinese Sports Committee standardized many different competition forms. It had developed sets said to represent the four major styles as well as combined forms. These five sets of forms were created by different teams, and later approved by a committee of wushu coaches in China. All sets of forms thus created were named after their style, e.g., the Ch'en Style National Competition Form is the <i>56 Forms</i>, and so on. The combined forms are <i>The 42 Form</i> or simply the <i>Competition Form</i>, as it is known in China. In the 11th <a href="/wiki/Asian_Games" title="Asian Games">Asian Games</a> of <a href="/wiki/1990" title="1990">1990</a>, wushu was included as an item for competition for the first time with the 42 Form being chosen to represent T'ai Chi. The International Wushu Federation (<a href="/w/index.php?title=IWUF&action=edit" class="new" title="IWUF">IWUF</a>) has applied for wushu to be part of the <a href="/wiki/Olympic_games" title="Olympic games">Olympic games</a>. If accepted, it is likely that T'ai Chi and wushu will be represented as demonstration events in <a href="/wiki/2008" title="2008">2008</a>.</p>
|
|
||||||
|
|
||||||
<p>Representatives of the original T'ai Chi families do not teach the forms developed by the Chinese Sports Committee. T'ai Chi Ch'üan has historically been seen by them as a martial art, not a sport, with competitions mostly entered as a hobby or to promote one's school publicly, but with little bearing on measuring actual accomplishment in the art. Their criticisms of modern forms include that the modern, "government" routines have no standardized, internally consistent training requirements. Also, that people studying competition forms rarely train pushing hands or other power generation trainings vital to learning the martial applications of T'ai Chi Ch'üan and thereby lack the <a href="/wiki/Quality_control" title="Quality control">quality control</a> traditional teachers maintain is essential for achieving the full benefits from both the health and the martial aspect of traditional T'ai Chi training.</p>
|
|
||||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="/w/index.php?title=Tai_Chi_Chuan&action=edit&section=8" title="Edit section: Health benefits">edit</a>]</div>
|
|
||||||
<p><a name="Health_benefits" id="Health_benefits"></a></p>
|
|
||||||
<h2>Health benefits</h2>
|
|
||||||
<p>Researchers have found that long-term T'ai Chi practice had favorable effects on the promotion of balance control, flexibility and cardiovascular fitness and reduced the risk of falls in elders. The studies also reported reduced pain, stress and anxiety in healthy subjects. Other studies have indicated improved cardiovascular and respiratory function in healthy subjects as well as those who had undergone coronary artery bypass surgery. Patients also benefited from T'ai Chi who suffered from heart failure, high blood pressure, heart attacks, arthritis and multiple sclerosis.</p>
|
|
||||||
<p>T'ai Chi has also been shown to reduce the symptoms of young Attention Deficit and Hyperactivity Disorder (<a href="/wiki/ADHD" title="ADHD">ADHD</a>) sufferers. T'ai Chi's gentle, low impact, movements surprisingly burn more calories than surfing and nearly as many as downhill skiing. T'ai Chi also boosts aspects of the immune system's function very significantly, and has been shown to reduce the incidence of anxiety, depression, and overall mood disturbance. (See research citations listed below.)</p>
|
|
||||||
|
|
||||||
<p>A pilot study has found evidence that T'ai Chi and related qigong helps reduce the severity of <a href="/wiki/Diabetes" title="Diabetes">diabetes</a>.<a href="http://www.abc.net.au/pm/content/2005/s1535304.htm" class="external autonumber" title="http://www.abc.net.au/pm/content/2005/s1535304.htm">[1]</a></p>
|
|
||||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="/w/index.php?title=Tai_Chi_Chuan&action=edit&section=9" title="Edit section: Citations to medical research">edit</a>]</div>
|
|
||||||
<p><a name="Citations_to_medical_research" id="Citations_to_medical_research"></a></p>
|
|
||||||
<h3>Citations to medical research</h3>
|
|
||||||
<ul>
|
|
||||||
<li>Wolf SL, Sattin RW, Kutner M. Intense T'ai Chi exercise training and fall occurrences in older, transitionally frail adults: a randomized, controlled trial. J Am Geriatr Soc. 2003 Dec; 51(12): 1693-701. <a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=14687346" class="external" title="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=14687346">PMID 14687346</a></li>
|
|
||||||
<li>Wang C, Collet JP, Lau J. The effect of Tai Chi on health outcomes in patients with chronic conditions: a <a href="/wiki/Systematic_review" title="Systematic review">systematic review</a>. Arch Intern Med. 2004 Mar 8;164(5):493-501. <a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=15006825" class="external" title="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=15006825">PMID 15006825</a></li>
|
|
||||||
|
|
||||||
<li>Search a listing of articles relating to the FICSIT trials and T'ai Chi <a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Select+from+History&db=pubmed&query_key=3" class="external autonumber" title="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Select+from+History&db=pubmed&query_key=3">[2]</a></li>
|
|
||||||
<li>Hernandez-Reif, M., Field, T.M., & Thimas, E. (2001). Attention deficit hyperactivity disorder: benefits from Tai Chi. Journal of Bodywork & Movement Therapies, 5(2):120-3, 2001 Apr, 5(23 ref), 120-123</li>
|
|
||||||
<li>Calorie Burning Chart <a href="http://www.nutristrategy.com/activitylist3.htm" class="external autonumber" title="http://www.nutristrategy.com/activitylist3.htm">[3]</a></li>
|
|
||||||
<li>Tai Chi boosts T-Cell counts in immune system <a href="http://www.acupuncturetoday.com/archives2003/nov/11taichi.html" class="external autonumber" title="http://www.acupuncturetoday.com/archives2003/nov/11taichi.html">[4]</a></li>
|
|
||||||
<li>Tai Chi, depression, anxiety, and mood disturbance (American Psychological Association) Journal of Psychosomatic Research, 1989 Vol 33 (2) 197-206</li>
|
|
||||||
|
|
||||||
<li>A comprehensive listing of Tai Chi medical research links <a href="http://www.worldtaichiday.org/WTCQDHlthBenft.html" class="external autonumber" title="http://www.worldtaichiday.org/WTCQDHlthBenft.html">[5]</a></li>
|
|
||||||
<li>References to medical publications <a href="http://www.worldtaichiday.org/HeadlineNews.html" class="external autonumber" title="http://www.worldtaichiday.org/HeadlineNews.html">[6]</a></li>
|
|
||||||
<li><a href="http://www.abc.net.au/pm/content/2005/s1535304.htm" class="external text" title="http://www.abc.net.au/pm/content/2005/s1535304.htm">Tai Chi a promising remedy for diabetes</a>, <i>Australian Broadcasting Corporation</i>, 20 December, 2005 - Pilot study of Qigong and tai chi in diabetes sufferers.</li>
|
|
||||||
<li>Health Research Articles on "Tai Chi as Health Therapy" for many issues, i.e. ADHD, Cardiac Health & Rehabilitation, Diabetes, High Blood Pressure, Menopause, Bone Loss, Weight Loss, etc.<a href="http://www.worldtaichiday.org/LIBRARYArticles/LIBRARYTaiChiArticlesMenu.html" class="external autonumber" title="http://www.worldtaichiday.org/LIBRARYArticles/LIBRARYTaiChiArticlesMenu.html">[7]</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="/w/index.php?title=Tai_Chi_Chuan&action=edit&section=10" title="Edit section: See also">edit</a>]</div>
|
|
||||||
<p><a name="See_also" id="See_also"></a></p>
|
|
||||||
<h2>See also</h2>
|
|
||||||
<ul>
|
|
||||||
<li><a href="/wiki/Jing_%28TCM%29" title="Jing (TCM)">Jing</a></li>
|
|
||||||
<li><a href="/wiki/List_of_Tai_Chi_Chuan_forms" title="List of Tai Chi Chuan forms">List of Tai Chi Chuan forms</a></li>
|
|
||||||
<li><a href="/wiki/Nei_Jin" title="Nei Jin">nei chin</a></li>
|
|
||||||
<li><a href="/wiki/Silk_reeling" title="Silk reeling">Silk reeling</a></li>
|
|
||||||
<li><a href="/wiki/World_Tai_Chi_and_Qigong_Day" title="World Tai Chi and Qigong Day">World Tai Chi and Qigong Day</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="/w/index.php?title=Tai_Chi_Chuan&action=edit&section=11" title="Edit section: External links">edit</a>]</div>
|
|
||||||
<p><a name="External_links" id="External_links"></a></p>
|
|
||||||
<h2>External links</h2>
|
|
||||||
<ul>
|
|
||||||
<li><a href="http://www.chenxiaowang.com/" class="external text" title="http://www.chenxiaowang.com/">A Chen Family Website</a></li>
|
|
||||||
<li><a href="http://www.yangfamilytaichi.com/" class="external text" title="http://www.yangfamilytaichi.com/">Yang Family Website</a></li>
|
|
||||||
<li><a href="http://www.wustyle.com/" class="external text" title="http://www.wustyle.com/">Wu Chien-ch'üan Family Website</a></li>
|
|
||||||
<li><a href="http://www.fushengyuan-taichi.com.au/" class="external text" title="http://www.fushengyuan-taichi.com.au/">Fu Family Website</a></li>
|
|
||||||
|
|
||||||
<li><a href="http://www.itcca.org/" class="external text" title="http://www.itcca.org/">Yang family disciple's website (ITCCA)</a></li>
|
|
||||||
<li><a href="http://www.dongtaichi.com/" class="external text" title="http://www.dongtaichi.com/">Dong T'ai Chi</a></li>
|
|
||||||
<li><a href="http://www.leefamilystyle.com/" class="external text" title="http://www.leefamilystyle.com/">UK website for Li style, popular in Europe</a></li>
|
|
||||||
<li><a href="http://www.chen-taiji.com/mambo/" class="external text" title="http://www.chen-taiji.com/mambo/">The World of Taijiquan</a></li>
|
|
||||||
<li><a href="http://www.scheele.org/lee/tcclinks.html" class="external text" title="http://www.scheele.org/lee/tcclinks.html">Lee Scheele's Links to T'ai Chi Ch'uan Web Sites</a></li>
|
|
||||||
<li><a href="http://news.bbc.co.uk/1/hi/health/3543907.stm" class="external text" title="http://news.bbc.co.uk/1/hi/health/3543907.stm">BBC article</a></li>
|
|
||||||
<li><a href="http://www.acupuncturetoday.com/archives2004/jul/07taichi.html" class="external text" title="http://www.acupuncturetoday.com/archives2004/jul/07taichi.html">Tai Chi: Good for the Mind, Good for the Body</a></li>
|
|
||||||
<li><a href="http://www.taichiunion.com/" class="external text" title="http://www.taichiunion.com/">Tai Chi Chuan Union for Great Britian: The largest collective of independent Tai Chi Chuan Instructors in the British Isles</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Saved in parser cache with key enwiki:pcache:idhash:30690-0!0!0!1!!en!2 and timestamp 20060722121412 -->
|
|
||||||
<div class="printfooter">
|
|
||||||
Retrieved from "<a href="http://en.wikipedia.org/wiki/Tai_Chi_Chuan">http://en.wikipedia.org/wiki/Tai_Chi_Chuan</a>"</div>
|
|
||||||
<div id="catlinks"><p class='catlinks'><a href="/w/index.php?title=Special:Categories&article=Tai_Chi_Chuan" title="Special:Categories">Categories</a>: <span dir='ltr'><a href="/wiki/Category:Chinese_martial_arts" title="Category:Chinese martial arts">Chinese martial arts</a></span> | <span dir='ltr'><a href="/wiki/Category:T%27ai_Chi_Ch%27uan" title="Category:T'ai Chi Ch'uan">T'ai Chi Ch'uan</a></span> | <span dir='ltr'><a href="/wiki/Category:Taoism" title="Category:Taoism">Taoism</a></span> | <span dir='ltr'><a href="/wiki/Category:Meditation" title="Category:Meditation">Meditation</a></span> | <span dir='ltr'><a href="/wiki/Category:Mind-body_interventions" title="Category:Mind-body interventions">Mind-body interventions</a></span> | <span dir='ltr'><a href="/wiki/Category:Traditional_Chinese_medicine" title="Category:Traditional Chinese medicine">Traditional Chinese medicine</a></span></p></div> <!-- end content -->
|
|
||||||
|
|
||||||
<div class="visualClear"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="column-one">
|
|
||||||
<div id="p-cactions" class="portlet">
|
|
||||||
<h5>Views</h5>
|
|
||||||
<ul>
|
|
||||||
|
|
||||||
<li id="ca-nstab-main" class="selected"><a href="/wiki/Tai_Chi_Chuan">Article</a></li>
|
|
||||||
<li id="ca-talk"><a href="/wiki/Talk:Tai_Chi_Chuan">Discussion</a></li>
|
|
||||||
<li id="ca-edit"><a href="/w/index.php?title=Tai_Chi_Chuan&action=edit">Edit this page</a></li>
|
|
||||||
<li id="ca-history"><a href="/w/index.php?title=Tai_Chi_Chuan&action=history">History</a></li>
|
|
||||||
<li id="ca-protect"><a href="/w/index.php?title=Tai_Chi_Chuan&action=protect">Protect</a></li>
|
|
||||||
<li id="ca-delete"><a href="/w/index.php?title=Tai_Chi_Chuan&action=delete">Delete</a></li>
|
|
||||||
|
|
||||||
<li id="ca-move"><a href="/w/index.php?title=Special:Movepage&target=Tai_Chi_Chuan">Move</a></li>
|
|
||||||
<li id="ca-unwatch"><a href="/w/index.php?title=Tai_Chi_Chuan&action=unwatch">Unwatch</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="portlet" id="p-personal">
|
|
||||||
<h5>Personal tools</h5>
|
|
||||||
<div class="pBody">
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li id="pt-userpage"><a href="/wiki/User:Edward_Z._Yang">Edward Z. Yang</a></li>
|
|
||||||
<li id="pt-mytalk"><a href="/wiki/User_talk:Edward_Z._Yang">My talk</a></li>
|
|
||||||
<li id="pt-preferences"><a href="/wiki/Special:Preferences">My preferences</a></li>
|
|
||||||
<li id="pt-watchlist"><a href="/wiki/Special:Watchlist">My watchlist</a></li>
|
|
||||||
<li id="pt-mycontris"><a href="/wiki/Special:Contributions/Edward_Z._Yang">My contributions</a></li>
|
|
||||||
|
|
||||||
<li id="pt-logout"><a href="/w/index.php?title=Special:Userlogout&returnto=Tai_Chi_Chuan">Log out</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="portlet" id="p-logo">
|
|
||||||
<a style="background-image: url(/images/wiki-en.png);" href="/wiki/Main_Page" title="Main Page"></a>
|
|
||||||
</div>
|
|
||||||
<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
|
|
||||||
|
|
||||||
<div class='portlet' id='p-navigation'>
|
|
||||||
<h5>Navigation</h5>
|
|
||||||
<div class='pBody'>
|
|
||||||
<ul>
|
|
||||||
<li id="n-mainpage"><a href="/wiki/Main_Page">Main Page</a></li>
|
|
||||||
<li id="n-portal"><a href="/wiki/Wikipedia:Community_Portal">Community Portal</a></li>
|
|
||||||
<li id="n-Featured-articles"><a href="/wiki/Wikipedia:Featured_articles">Featured articles</a></li>
|
|
||||||
|
|
||||||
<li id="n-currentevents"><a href="/wiki/Portal:Current_events">Current events</a></li>
|
|
||||||
<li id="n-recentchanges"><a href="/wiki/Special:Recentchanges">Recent changes</a></li>
|
|
||||||
<li id="n-randompage"><a href="/wiki/Special:Random">Random article</a></li>
|
|
||||||
<li id="n-help"><a href="/wiki/Help:Contents">Help</a></li>
|
|
||||||
<li id="n-contact"><a href="/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li>
|
|
||||||
<li id="n-sitesupport"><a href="http://wikimediafoundation.org/wiki/Fundraising#Donation_methods">Donations</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="p-search" class="portlet">
|
|
||||||
<h5><label for="searchInput">Search</label></h5>
|
|
||||||
<div id="searchBody" class="pBody">
|
|
||||||
<form action="/wiki/Special:Search" id="searchform"><div>
|
|
||||||
<input id="searchInput" name="search" type="text" accesskey="f" value="" />
|
|
||||||
|
|
||||||
<input type='submit' name="go" class="searchButton" id="searchGoButton" value="Go" />
|
|
||||||
<input type='submit' name="fulltext" class="searchButton" value="Search" />
|
|
||||||
</div></form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="portlet" id="p-tb">
|
|
||||||
<h5>Toolbox</h5>
|
|
||||||
<div class="pBody">
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li id="t-whatlinkshere"><a href="/w/index.php?title=Special:Whatlinkshere&target=Tai_Chi_Chuan">What links here</a></li>
|
|
||||||
<li id="t-recentchangeslinked"><a href="/w/index.php?title=Special:Recentchangeslinked&target=Tai_Chi_Chuan">Related changes</a></li>
|
|
||||||
<li id="t-upload"><a href="/wiki/Special:Upload">Upload file</a></li>
|
|
||||||
<li id="t-specialpages"><a href="/wiki/Special:Specialpages">Special pages</a></li>
|
|
||||||
<li id="t-print"><a href="/w/index.php?title=Tai_Chi_Chuan&printable=yes">Printable version</a></li> <li id="t-permalink"><a href="/w/index.php?title=Tai_Chi_Chuan&oldid=65197836">Permanent link</a></li><li id="t-cite"><a href="/w/index.php?title=Special:Cite&page=Tai_Chi_Chuan&id=65197836">Cite this article</a></li> </ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="p-lang" class="portlet">
|
|
||||||
<h5>In other languages</h5>
|
|
||||||
<div class="pBody">
|
|
||||||
<ul>
|
|
||||||
<li class="interwiki-br"><a href="http://br.wikipedia.org/wiki/Taichichuan">Brezhoneg</a></li>
|
|
||||||
<li class="interwiki-ca"><a href="http://ca.wikipedia.org/wiki/Tai_txi_txuan">Català</a></li>
|
|
||||||
|
|
||||||
<li class="interwiki-cs"><a href="http://cs.wikipedia.org/wiki/Tchaj-%C5%A5i">Cesky</a></li>
|
|
||||||
<li class="interwiki-da"><a href="http://da.wikipedia.org/wiki/Tai_Chi">Dansk</a></li>
|
|
||||||
<li class="interwiki-de"><a href="http://de.wikipedia.org/wiki/Taijiquan">Deutsch</a></li>
|
|
||||||
<li class="interwiki-et"><a href="http://et.wikipedia.org/wiki/Taijiquan">Eesti</a></li>
|
|
||||||
<li class="interwiki-el"><a href="http://el.wikipedia.org/wiki/%CE%A4%CE%AC%CE%B9_%CE%A4%CE%B6%CE%AF_%CE%A3%CE%BF%CF%85%CE%AC%CE%BD">????????</a></li>
|
|
||||||
<li class="interwiki-es"><a href="http://es.wikipedia.org/wiki/Tai_Chi_Chuan">Español</a></li>
|
|
||||||
|
|
||||||
<li class="interwiki-eo"><a href="http://eo.wikipedia.org/wiki/Taj%C4%9Di%C4%89uano">Esperanto</a></li>
|
|
||||||
<li class="interwiki-fr"><a href="http://fr.wikipedia.org/wiki/Tai-chi-chuan">Français</a></li>
|
|
||||||
<li class="interwiki-it"><a href="http://it.wikipedia.org/wiki/Taijiquan">Italiano</a></li>
|
|
||||||
<li class="interwiki-he"><a href="http://he.wikipedia.org/wiki/%D7%98%D7%90%D7%99_%D7%A6%27%D7%99">?????</a></li>
|
|
||||||
<li class="interwiki-hu"><a href="http://hu.wikipedia.org/wiki/Taijiquan">Magyar</a></li>
|
|
||||||
<li class="interwiki-nl"><a href="http://nl.wikipedia.org/wiki/Tai_Chi">Nederlands</a></li>
|
|
||||||
|
|
||||||
<li class="interwiki-ja"><a href="http://ja.wikipedia.org/wiki/%E5%A4%AA%E6%A5%B5%E6%8B%B3">???</a></li>
|
|
||||||
<li class="interwiki-pl"><a href="http://pl.wikipedia.org/wiki/Taijiquan">Polski</a></li>
|
|
||||||
<li class="interwiki-pt"><a href="http://pt.wikipedia.org/wiki/Tai_Chi_Chuan">Português</a></li>
|
|
||||||
<li class="interwiki-ro"><a href="http://ro.wikipedia.org/wiki/Taijiquan">Româna</a></li>
|
|
||||||
<li class="interwiki-ru"><a href="http://ru.wikipedia.org/wiki/%D0%A2%D0%B0%D0%B9%D1%86%D0%B7%D0%B8%D1%86%D1%8E%D0%B0%D0%BD%D1%8C">???????</a></li>
|
|
||||||
<li class="interwiki-fi"><a href="http://fi.wikipedia.org/wiki/Taijiquan">Suomi</a></li>
|
|
||||||
|
|
||||||
<li class="interwiki-sv"><a href="http://sv.wikipedia.org/wiki/Taijiquan">Svenska</a></li>
|
|
||||||
<li class="interwiki-th"><a href="http://th.wikipedia.org/wiki/%E0%B9%84%E0%B8%97%E0%B9%88%E0%B9%80%E0%B8%81%E0%B9%8A%E0%B8%81">???</a></li>
|
|
||||||
<li class="interwiki-tr"><a href="http://tr.wikipedia.org/wiki/Tai-Chi_Chuan">Türkçe</a></li>
|
|
||||||
<li class="interwiki-zh"><a href="http://zh.wikipedia.org/wiki/%E5%A4%AA%E6%9E%81%E6%8B%B3">??</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div><!-- end of the left (by default at least) column -->
|
|
||||||
<div class="visualClear"></div>
|
|
||||||
<div id="footer">
|
|
||||||
<div id="f-poweredbyico"><a href="http://www.mediawiki.org/"><img src="/skins-1.5/common/images/poweredby_mediawiki_88x31.png" alt="MediaWiki" /></a></div>
|
|
||||||
<div id="f-copyrightico"><a href="http://wikimediafoundation.org/"><img src="/images/wikimedia-button.png" border="0" alt="Wikimedia Foundation"/></a></div>
|
|
||||||
<ul id="f-list">
|
|
||||||
<li id="lastmod"> This page was last modified 03:15, July 22, 2006.</li>
|
|
||||||
<li id="copyright">All text is available under the terms of the <a class='internal' href="/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License" title="Wikipedia:Text of the GNU Free Documentation License">GNU Free Documentation License</a>. (See <b><a class='internal' href="/wiki/Wikipedia:Copyrights" title="Wikipedia:Copyrights">Copyrights</a></b> for details.) <br /> Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc.<br /></li>
|
|
||||||
|
|
||||||
<li id="privacy"><a href="http://wikimediafoundation.org/wiki/Privacy_policy" title="wikimedia:Privacy policy">Privacy policy</a></li>
|
|
||||||
<li id="about"><a href="/wiki/Wikipedia:About" title="Wikipedia:About">About Wikipedia</a></li>
|
|
||||||
<li id="disclaimer"><a href="/wiki/Wikipedia:General_disclaimer" title="Wikipedia:General disclaimer">Disclaimers</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<script type="text/javascript"> if (window.runOnloadHook) runOnloadHook();</script>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Served by srv25 in 0.089 secs. -->
|
|
||||||
</body></html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
|
@ -1,7 +0,0 @@
|
||||||
Disclaimer:
|
|
||||||
|
|
||||||
The HTML used in these samples are taken from random websites. I claim
|
|
||||||
no copyright over these and assert that I may use them like this under
|
|
||||||
fair use.
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
|
@ -1,64 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generates XML and HTML documents describing configuration.
|
|
||||||
* @note PHP 5.2+ only!
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
TODO:
|
|
||||||
- make XML format richer
|
|
||||||
- extend XSLT transformation (see the corresponding XSLT file)
|
|
||||||
- allow generation of packaged docs that can be easily moved
|
|
||||||
- multipage documentation
|
|
||||||
- determine how to multilingualize
|
|
||||||
- add blurbs to ToC
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (version_compare(PHP_VERSION, '5.2', '<')) exit('PHP 5.2+ required.');
|
|
||||||
error_reporting(E_ALL | E_STRICT);
|
|
||||||
|
|
||||||
// load dual-libraries
|
|
||||||
require_once dirname(__FILE__) . '/../extras/HTMLPurifierExtras.auto.php';
|
|
||||||
require_once dirname(__FILE__) . '/../library/HTMLPurifier.auto.php';
|
|
||||||
|
|
||||||
// setup HTML Purifier singleton
|
|
||||||
HTMLPurifier::getInstance(array(
|
|
||||||
'AutoFormat.PurifierLinkify' => true
|
|
||||||
));
|
|
||||||
|
|
||||||
$builder = new HTMLPurifier_ConfigSchema_InterchangeBuilder();
|
|
||||||
$interchange = new HTMLPurifier_ConfigSchema_Interchange();
|
|
||||||
$builder->buildDir($interchange);
|
|
||||||
$loader = dirname(__FILE__) . '/../config-schema.php';
|
|
||||||
if (file_exists($loader)) include $loader;
|
|
||||||
$interchange->validate();
|
|
||||||
|
|
||||||
$style = 'plain'; // use $_GET in the future, careful to validate!
|
|
||||||
$configdoc_xml = dirname(__FILE__) . '/configdoc.xml';
|
|
||||||
|
|
||||||
$xml_builder = new HTMLPurifier_ConfigSchema_Builder_Xml();
|
|
||||||
$xml_builder->openURI($configdoc_xml);
|
|
||||||
$xml_builder->build($interchange);
|
|
||||||
unset($xml_builder); // free handle
|
|
||||||
|
|
||||||
$xslt = new ConfigDoc_HTMLXSLTProcessor();
|
|
||||||
$xslt->importStylesheet(dirname(__FILE__) . "/styles/$style.xsl");
|
|
||||||
$output = $xslt->transformToHTML($configdoc_xml);
|
|
||||||
|
|
||||||
if (!$output) {
|
|
||||||
echo "Error in generating files\n";
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// write out
|
|
||||||
file_put_contents(dirname(__FILE__) . "/$style.html", $output);
|
|
||||||
|
|
||||||
if (php_sapi_name() != 'cli') {
|
|
||||||
// output (instant feedback if it's a browser)
|
|
||||||
echo $output;
|
|
||||||
} else {
|
|
||||||
echo "Files generated successfully.\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
// vim: et sw=4 sts=4
|
|
|
@ -1,44 +0,0 @@
|
||||||
|
|
||||||
body {margin:0;padding:0;}
|
|
||||||
#content {
|
|
||||||
margin:1em auto;
|
|
||||||
max-width: 47em;
|
|
||||||
width: expression(document.body.clientWidth >
|
|
||||||
85 * parseInt(document.body.currentStyle.fontSize) ?
|
|
||||||
"54em": "auto");
|
|
||||||
}
|
|
||||||
|
|
||||||
table {border-collapse:collapse;}
|
|
||||||
table td, table th {padding:0.2em;}
|
|
||||||
|
|
||||||
table.constraints {margin:0 0 1em;}
|
|
||||||
table.constraints th {
|
|
||||||
text-align:right;padding-left:0.4em;padding-right:0.4em;background:#EEE;
|
|
||||||
width:8em;vertical-align:top;}
|
|
||||||
table.constraints td {padding-right:0.4em; padding-left: 1em;}
|
|
||||||
table.constraints td ul {padding:0; margin:0; list-style:none;}
|
|
||||||
table.constraints td pre {margin:0;}
|
|
||||||
|
|
||||||
#tocContainer {position:relative;}
|
|
||||||
#toc {list-style-type:none; font-weight:bold; font-size:1em; margin-bottom:1em;}
|
|
||||||
#toc li {position:relative; line-height: 1.2em;}
|
|
||||||
#toc .col-2 {margin-left:50%;}
|
|
||||||
#toc .col-l {float:left;}
|
|
||||||
#toc ul {list-style-type:disc; font-weight:normal; padding-bottom:1.2em;}
|
|
||||||
|
|
||||||
.description p {margin-top:0;margin-bottom:1em;}
|
|
||||||
|
|
||||||
#library, h1 {text-align:center; font-family:Garamond, serif;
|
|
||||||
font-variant:small-caps;}
|
|
||||||
#library {font-size:1em;}
|
|
||||||
h1 {margin-top:0;}
|
|
||||||
h2 {border-bottom:1px solid #CCC; font-family:sans-serif; font-weight:normal;
|
|
||||||
font-size:1.3em; clear:both;}
|
|
||||||
h3 {font-family:sans-serif; font-size:1.1em; font-weight:bold; }
|
|
||||||
h4 {font-family:sans-serif; font-size:0.9em; font-weight:bold; }
|
|
||||||
|
|
||||||
.deprecated {color: #CCC;}
|
|
||||||
.deprecated table.constraints th {background:#FFF;}
|
|
||||||
.deprecated-notice {color: #000; text-align:center; margin-bottom: 1em;}
|
|
||||||
|
|
||||||
/* vim: et sw=4 sts=4 */
|
|
|
@ -1,253 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<xsl:stylesheet
|
|
||||||
version = "1.0"
|
|
||||||
xmlns = "http://www.w3.org/1999/xhtml"
|
|
||||||
xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
|
|
||||||
>
|
|
||||||
<xsl:output
|
|
||||||
method = "xml"
|
|
||||||
encoding = "UTF-8"
|
|
||||||
doctype-public = "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
doctype-system = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
|
|
||||||
indent = "no"
|
|
||||||
media-type = "text/html"
|
|
||||||
/>
|
|
||||||
<xsl:param name="css" select="'styles/plain.css'"/>
|
|
||||||
<xsl:param name="title" select="'Configuration Documentation'"/>
|
|
||||||
|
|
||||||
<xsl:variable name="typeLookup" select="document('../types.xml')/types" />
|
|
||||||
<xsl:variable name="usageLookup" select="document('../usage.xml')/usage" />
|
|
||||||
|
|
||||||
<!-- Twiddle this variable to get the columns as even as possible -->
|
|
||||||
<xsl:variable name="maxNumberAdjust" select="2" />
|
|
||||||
|
|
||||||
<xsl:template match="/">
|
|
||||||
<html lang="en" xml:lang="en">
|
|
||||||
<head>
|
|
||||||
<title><xsl:value-of select="$title" /> - <xsl:value-of select="/configdoc/title" /></title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="{$css}" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="content">
|
|
||||||
<div id="library"><xsl:value-of select="/configdoc/title" /></div>
|
|
||||||
<h1><xsl:value-of select="$title" /></h1>
|
|
||||||
<div id="tocContainer">
|
|
||||||
<h2>Table of Contents</h2>
|
|
||||||
<ul id="toc">
|
|
||||||
<xsl:apply-templates mode="toc">
|
|
||||||
<xsl:with-param name="overflowNumber" select="round(count(/configdoc/namespace) div 2) + $maxNumberAdjust" />
|
|
||||||
</xsl:apply-templates>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="typesContainer">
|
|
||||||
<h2>Types</h2>
|
|
||||||
<xsl:apply-templates select="$typeLookup" mode="types" />
|
|
||||||
</div>
|
|
||||||
<xsl:apply-templates />
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="type" mode="types">
|
|
||||||
<div class="type-block">
|
|
||||||
<xsl:attribute name="id">type-<xsl:value-of select="@id" /></xsl:attribute>
|
|
||||||
<h3><code><xsl:value-of select="@id" /></code>: <xsl:value-of select="@name" /></h3>
|
|
||||||
<div class="type-description">
|
|
||||||
<xsl:copy-of xmlns:xhtml="http://www.w3.org/1999/xhtml" select="xhtml:div/node()" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="title" mode="toc" />
|
|
||||||
<xsl:template match="namespace" mode="toc">
|
|
||||||
<xsl:param name="overflowNumber" />
|
|
||||||
<xsl:variable name="number"><xsl:number level="single" /></xsl:variable>
|
|
||||||
<xsl:variable name="directiveNumber"><xsl:number level="any" count="directive" /></xsl:variable>
|
|
||||||
<xsl:if test="count(directive)>0">
|
|
||||||
<li>
|
|
||||||
<!-- BEGIN multicolumn code -->
|
|
||||||
<xsl:if test="$number >= $overflowNumber">
|
|
||||||
<xsl:attribute name="class">col-2</xsl:attribute>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="$number = $overflowNumber">
|
|
||||||
<xsl:attribute name="style">margin-top:-<xsl:value-of select="($number * 2 + $directiveNumber - 3) * 1.2" />em</xsl:attribute>
|
|
||||||
</xsl:if>
|
|
||||||
<!-- END multicolumn code -->
|
|
||||||
<a href="#{@id}"><xsl:value-of select="name" /></a>
|
|
||||||
<ul>
|
|
||||||
<xsl:apply-templates select="directive" mode="toc">
|
|
||||||
<xsl:with-param name="overflowNumber" select="$overflowNumber" />
|
|
||||||
</xsl:apply-templates>
|
|
||||||
</ul>
|
|
||||||
<xsl:if test="$number + 1 = $overflowNumber">
|
|
||||||
<div class="col-l" />
|
|
||||||
</xsl:if>
|
|
||||||
</li>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="directive" mode="toc">
|
|
||||||
<xsl:variable name="number">
|
|
||||||
<xsl:number level="any" count="directive|namespace" />
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:if test="not(deprecated)">
|
|
||||||
<li>
|
|
||||||
<a href="#{@id}"><xsl:value-of select="name" /></a>
|
|
||||||
</li>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="title" />
|
|
||||||
|
|
||||||
<xsl:template match="namespace">
|
|
||||||
<div class="namespace">
|
|
||||||
<xsl:apply-templates />
|
|
||||||
<xsl:if test="count(directive)=0">
|
|
||||||
<p>No configuration directives defined for this namespace.</p>
|
|
||||||
</xsl:if>
|
|
||||||
</div>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="namespace/name">
|
|
||||||
<h2 id="{../@id}"><xsl:value-of select="." /></h2>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="namespace/description">
|
|
||||||
<div class="description">
|
|
||||||
<xsl:copy-of xmlns:xhtml="http://www.w3.org/1999/xhtml" select="xhtml:div/node()" />
|
|
||||||
</div>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="directive">
|
|
||||||
<div>
|
|
||||||
<xsl:attribute name="class"><!--
|
|
||||||
-->directive<!--
|
|
||||||
--><xsl:if test="deprecated"> deprecated</xsl:if><!--
|
|
||||||
--></xsl:attribute>
|
|
||||||
<xsl:apply-templates>
|
|
||||||
<xsl:with-param name="id" select="@id" />
|
|
||||||
</xsl:apply-templates>
|
|
||||||
</div>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="directive/name">
|
|
||||||
<xsl:param name="id" />
|
|
||||||
<xsl:apply-templates select="../aliases/alias" mode="anchor" />
|
|
||||||
<h3 id="{$id}"><xsl:value-of select="$id" /></h3>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="alias" mode="anchor">
|
|
||||||
<a id="{.}"></a>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- Do not pass through -->
|
|
||||||
<xsl:template match="alias"></xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="directive/constraints">
|
|
||||||
<xsl:param name="id" />
|
|
||||||
<table class="constraints">
|
|
||||||
<xsl:apply-templates />
|
|
||||||
<xsl:if test="../aliases/alias">
|
|
||||||
<xsl:apply-templates select="../aliases" mode="constraints" />
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:apply-templates select="$usageLookup/directive[@id=$id]" />
|
|
||||||
</table>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="directive/aliases" mode="constraints">
|
|
||||||
<tr>
|
|
||||||
<th>Aliases</th>
|
|
||||||
<td>
|
|
||||||
<xsl:for-each select="alias">
|
|
||||||
<xsl:if test="position()>1">, </xsl:if>
|
|
||||||
<xsl:value-of select="." />
|
|
||||||
</xsl:for-each>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="directive/description">
|
|
||||||
<div class="description">
|
|
||||||
<xsl:copy-of xmlns:xhtml="http://www.w3.org/1999/xhtml" select="xhtml:div/node()" />
|
|
||||||
</div>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="directive/deprecated">
|
|
||||||
<div class="deprecated-notice">
|
|
||||||
<strong>Warning:</strong>
|
|
||||||
This directive was deprecated in version <xsl:value-of select="version" />.
|
|
||||||
<a href="#{use}">%<xsl:value-of select="use" /></a> should be used instead.
|
|
||||||
</div>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="usage/directive">
|
|
||||||
<tr>
|
|
||||||
<th>Used in</th>
|
|
||||||
<td>
|
|
||||||
<ul>
|
|
||||||
<xsl:apply-templates />
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="usage/directive/file">
|
|
||||||
<li>
|
|
||||||
<em><xsl:value-of select="@name" /></em> on line<xsl:if test="count(line)>1">s</xsl:if>
|
|
||||||
<xsl:text> </xsl:text>
|
|
||||||
<xsl:for-each select="line">
|
|
||||||
<xsl:if test="position()>1">, </xsl:if>
|
|
||||||
<xsl:value-of select="." />
|
|
||||||
</xsl:for-each>
|
|
||||||
</li>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="constraints/version">
|
|
||||||
<tr>
|
|
||||||
<th>Version added</th>
|
|
||||||
<td><xsl:value-of select="." /></td>
|
|
||||||
</tr>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="constraints/type">
|
|
||||||
<tr>
|
|
||||||
<th>Type</th>
|
|
||||||
<td>
|
|
||||||
<xsl:variable name="type" select="text()" />
|
|
||||||
<xsl:attribute name="class">type type-<xsl:value-of select="$type" /></xsl:attribute>
|
|
||||||
<a>
|
|
||||||
<xsl:attribute name="href">#type-<xsl:value-of select="$type" /></xsl:attribute>
|
|
||||||
<xsl:value-of select="$typeLookup/type[@id=$type]/@name" />
|
|
||||||
<xsl:if test="@allow-null='yes'">
|
|
||||||
(or null)
|
|
||||||
</xsl:if>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="constraints/allowed">
|
|
||||||
<tr>
|
|
||||||
<th>Allowed values</th>
|
|
||||||
<td>
|
|
||||||
<xsl:for-each select="value"><!--
|
|
||||||
--><xsl:if test="position()>1">, </xsl:if>
|
|
||||||
"<xsl:value-of select="." />"<!--
|
|
||||||
--></xsl:for-each>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="constraints/default">
|
|
||||||
<tr>
|
|
||||||
<th>Default</th>
|
|
||||||
<td><pre><xsl:value-of select="." xml:space="preserve" /></pre></td>
|
|
||||||
</tr>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="constraints/external">
|
|
||||||
<tr>
|
|
||||||
<th>External deps</th>
|
|
||||||
<td>
|
|
||||||
<ul>
|
|
||||||
<xsl:apply-templates />
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="constraints/external/project">
|
|
||||||
<li><xsl:value-of select="." /></li>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
69
vendor/ezyang/htmlpurifier/configdoc/types.xml
vendored
|
@ -1,69 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<types>
|
|
||||||
<type id="string" name="String"><div xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
A <a
|
|
||||||
href="http://docs.php.net/manual/en/language.types.string.php">sequence
|
|
||||||
of characters</a>.
|
|
||||||
</div></type>
|
|
||||||
<type id="istring" name="Case-insensitive string"><div xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
A series of case-insensitive characters. Internally, upper-case
|
|
||||||
ASCII characters will be converted to lower-case.
|
|
||||||
</div></type>
|
|
||||||
<type id="text" name="Text"><div xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
A series of characters that may contain newlines. Text tends to
|
|
||||||
indicate human-oriented text, as opposed to a machine format.
|
|
||||||
</div></type>
|
|
||||||
<type id="itext" name="Case-insensitive text"><div xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
A series of case-insensitive characters that may contain newlines.
|
|
||||||
</div></type>
|
|
||||||
<type id="int" name="Integer"><div xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
An <a
|
|
||||||
href="http://docs.php.net/manual/en/language.types.integer.php">
|
|
||||||
integer</a>. You are alternatively permitted to pass a string of
|
|
||||||
digits instead, which will be cast to an integer using
|
|
||||||
<code>(int)</code>.
|
|
||||||
</div></type>
|
|
||||||
<type id="float" name="Float"><div xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
A <a href="http://docs.php.net/manual/en/language.types.float.php">
|
|
||||||
floating point number</a>. You are alternatively permitted to
|
|
||||||
pass a numeric string (as defined by <code>is_numeric()</code>),
|
|
||||||
which will be cast to a float using <code>(float)</code>.
|
|
||||||
</div></type>
|
|
||||||
<type id="bool" name="Boolean"><div xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
A <a
|
|
||||||
href="http://docs.php.net/manual/en/language.types.boolean.php">boolean</a>.
|
|
||||||
You are alternatively permitted to pass an integer <code>0</code> or
|
|
||||||
<code>1</code> (other integers are not permitted) or a string
|
|
||||||
<code>"on"</code>, <code>"true"</code> or <code>"1"</code> for
|
|
||||||
<code>true</code>, and <code>"off"</code>, <code>"false"</code> or
|
|
||||||
<code>"0"</code> for <code>false</code>.
|
|
||||||
</div></type>
|
|
||||||
<type id="lookup" name="Lookup array"><div xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
An array whose values are <code>true</code>, e.g. <code>array('key'
|
|
||||||
=> true, 'key2' => true)</code>. You are alternatively permitted
|
|
||||||
to pass an array list of the keys <code>array('key', 'key2')</code>
|
|
||||||
or a comma-separated string of keys <code>"key, key2"</code>. If
|
|
||||||
you pass an array list of values, ensure that your values are
|
|
||||||
strictly numerically indexed: <code>array('key1', 2 =>
|
|
||||||
'key2')</code> will not do what you expect and emits a warning.
|
|
||||||
</div></type>
|
|
||||||
<type id="list" name="Array list"><div xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
An array which has consecutive integer indexes, e.g.
|
|
||||||
<code>array('val1', 'val2')</code>. You are alternatively permitted
|
|
||||||
to pass a comma-separated string of keys <code>"val1, val2"</code>.
|
|
||||||
If your array is not in this form, <code>array_values</code> is run
|
|
||||||
on the array and a warning is emitted.
|
|
||||||
</div></type>
|
|
||||||
<type id="hash" name="Associative array"><div xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
An array which is a mapping of keys to values, e.g.
|
|
||||||
<code>array('key1' => 'val1', 'key2' => 'val2')</code>. You are
|
|
||||||
alternatively permitted to pass a comma-separated string of
|
|
||||||
key-colon-value strings, e.g. <code>"key1: val1, key2: val2"</code>.
|
|
||||||
</div></type>
|
|
||||||
<type id="mixed" name="Mixed"><div xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
An arbitrary PHP value of any type.
|
|
||||||
</div></type>
|
|
||||||
</types>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
600
vendor/ezyang/htmlpurifier/configdoc/usage.xml
vendored
|
@ -1,600 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<usage>
|
|
||||||
<directive id="Core.CollectErrors">
|
|
||||||
<file name="HTMLPurifier.php">
|
|
||||||
<line>162</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/Lexer.php">
|
|
||||||
<line>85</line>
|
|
||||||
<line>326</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/Lexer/DirectLex.php">
|
|
||||||
<line>67</line>
|
|
||||||
<line>87</line>
|
|
||||||
<line>385</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/Strategy/RemoveForeignElements.php">
|
|
||||||
<line>57</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="CSS.MaxImgLength">
|
|
||||||
<file name="HTMLPurifier/CSSDefinition.php">
|
|
||||||
<line>240</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="CSS.Proprietary">
|
|
||||||
<file name="HTMLPurifier/CSSDefinition.php">
|
|
||||||
<line>365</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="CSS.AllowTricky">
|
|
||||||
<file name="HTMLPurifier/CSSDefinition.php">
|
|
||||||
<line>369</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="CSS.Trusted">
|
|
||||||
<file name="HTMLPurifier/CSSDefinition.php">
|
|
||||||
<line>373</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="CSS.AllowImportant">
|
|
||||||
<file name="HTMLPurifier/CSSDefinition.php">
|
|
||||||
<line>377</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="CSS.AllowedProperties">
|
|
||||||
<file name="HTMLPurifier/CSSDefinition.php">
|
|
||||||
<line>506</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="CSS.ForbiddenProperties">
|
|
||||||
<file name="HTMLPurifier/CSSDefinition.php">
|
|
||||||
<line>522</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Cache.DefinitionImpl">
|
|
||||||
<file name="HTMLPurifier/DefinitionCacheFactory.php">
|
|
||||||
<line>66</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.Doctype">
|
|
||||||
<file name="HTMLPurifier/DoctypeRegistry.php">
|
|
||||||
<line>119</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.CustomDoctype">
|
|
||||||
<file name="HTMLPurifier/DoctypeRegistry.php">
|
|
||||||
<line>123</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.XHTML">
|
|
||||||
<file name="HTMLPurifier/DoctypeRegistry.php">
|
|
||||||
<line>128</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.Strict">
|
|
||||||
<file name="HTMLPurifier/DoctypeRegistry.php">
|
|
||||||
<line>133</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.Encoding">
|
|
||||||
<file name="HTMLPurifier/Encoder.php">
|
|
||||||
<line>380</line>
|
|
||||||
<line>428</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Test.ForceNoIconv">
|
|
||||||
<file name="HTMLPurifier/Encoder.php">
|
|
||||||
<line>388</line>
|
|
||||||
<line>439</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.EscapeNonASCIICharacters">
|
|
||||||
<file name="HTMLPurifier/Encoder.php">
|
|
||||||
<line>429</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Output.CommentScriptContents">
|
|
||||||
<file name="HTMLPurifier/Generator.php">
|
|
||||||
<line>70</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Output.FixInnerHTML">
|
|
||||||
<file name="HTMLPurifier/Generator.php">
|
|
||||||
<line>71</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Output.SortAttr">
|
|
||||||
<file name="HTMLPurifier/Generator.php">
|
|
||||||
<line>72</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Output.FlashCompat">
|
|
||||||
<file name="HTMLPurifier/Generator.php">
|
|
||||||
<line>73</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Output.TidyFormat">
|
|
||||||
<file name="HTMLPurifier/Generator.php">
|
|
||||||
<line>104</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.NormalizeNewlines">
|
|
||||||
<file name="HTMLPurifier/Generator.php">
|
|
||||||
<line>122</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/Lexer.php">
|
|
||||||
<line>308</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Output.Newline">
|
|
||||||
<file name="HTMLPurifier/Generator.php">
|
|
||||||
<line>123</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.BlockWrapper">
|
|
||||||
<file name="HTMLPurifier/HTMLDefinition.php">
|
|
||||||
<line>263</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.Parent">
|
|
||||||
<file name="HTMLPurifier/HTMLDefinition.php">
|
|
||||||
<line>273</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.AllowedElements">
|
|
||||||
<file name="HTMLPurifier/HTMLDefinition.php">
|
|
||||||
<line>291</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.AllowedAttributes">
|
|
||||||
<file name="HTMLPurifier/HTMLDefinition.php">
|
|
||||||
<line>292</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.Allowed">
|
|
||||||
<file name="HTMLPurifier/HTMLDefinition.php">
|
|
||||||
<line>295</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.ForbiddenElements">
|
|
||||||
<file name="HTMLPurifier/HTMLDefinition.php">
|
|
||||||
<line>399</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.ForbiddenAttributes">
|
|
||||||
<file name="HTMLPurifier/HTMLDefinition.php">
|
|
||||||
<line>400</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.Trusted">
|
|
||||||
<file name="HTMLPurifier/HTMLModuleManager.php">
|
|
||||||
<line>234</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/Lexer.php">
|
|
||||||
<line>313</line>
|
|
||||||
<line>353</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/HTMLModule/Image.php">
|
|
||||||
<line>37</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/Lexer/DirectLex.php">
|
|
||||||
<line>47</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/Strategy/RemoveForeignElements.php">
|
|
||||||
<line>30</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.AllowedModules">
|
|
||||||
<file name="HTMLPurifier/HTMLModuleManager.php">
|
|
||||||
<line>241</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.CoreModules">
|
|
||||||
<file name="HTMLPurifier/HTMLModuleManager.php">
|
|
||||||
<line>242</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.Proprietary">
|
|
||||||
<file name="HTMLPurifier/HTMLModuleManager.php">
|
|
||||||
<line>256</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.SafeObject">
|
|
||||||
<file name="HTMLPurifier/HTMLModuleManager.php">
|
|
||||||
<line>259</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.SafeEmbed">
|
|
||||||
<file name="HTMLPurifier/HTMLModuleManager.php">
|
|
||||||
<line>262</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.SafeScripting">
|
|
||||||
<file name="HTMLPurifier/HTMLModuleManager.php">
|
|
||||||
<line>265</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/HTMLModule/SafeScripting.php">
|
|
||||||
<line>22</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.Nofollow">
|
|
||||||
<file name="HTMLPurifier/HTMLModuleManager.php">
|
|
||||||
<line>268</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.TargetBlank">
|
|
||||||
<file name="HTMLPurifier/HTMLModuleManager.php">
|
|
||||||
<line>271</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.TargetNoreferrer">
|
|
||||||
<file name="HTMLPurifier/HTMLModuleManager.php">
|
|
||||||
<line>276</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.TargetNoopener">
|
|
||||||
<file name="HTMLPurifier/HTMLModuleManager.php">
|
|
||||||
<line>279</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Attr.IDBlacklist">
|
|
||||||
<file name="HTMLPurifier/IDAccumulator.php">
|
|
||||||
<line>27</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.Language">
|
|
||||||
<file name="HTMLPurifier/LanguageFactory.php">
|
|
||||||
<line>93</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.LexerImpl">
|
|
||||||
<file name="HTMLPurifier/Lexer.php">
|
|
||||||
<line>80</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.MaintainLineNumbers">
|
|
||||||
<file name="HTMLPurifier/Lexer.php">
|
|
||||||
<line>84</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/Lexer/DirectLex.php">
|
|
||||||
<line>62</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.LegacyEntityDecoder">
|
|
||||||
<file name="HTMLPurifier/Lexer.php">
|
|
||||||
<line>215</line>
|
|
||||||
<line>337</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.ConvertDocumentToFragment">
|
|
||||||
<file name="HTMLPurifier/Lexer.php">
|
|
||||||
<line>324</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.RemoveProcessingInstructions">
|
|
||||||
<file name="HTMLPurifier/Lexer.php">
|
|
||||||
<line>347</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.HiddenElements">
|
|
||||||
<file name="HTMLPurifier/Lexer.php">
|
|
||||||
<line>351</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/Strategy/RemoveForeignElements.php">
|
|
||||||
<line>36</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.AggressivelyRemoveScript">
|
|
||||||
<file name="HTMLPurifier/Lexer.php">
|
|
||||||
<line>352</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.RemoveScriptContents">
|
|
||||||
<file name="HTMLPurifier/Lexer.php">
|
|
||||||
<line>353</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/Strategy/RemoveForeignElements.php">
|
|
||||||
<line>35</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="URI.">
|
|
||||||
<file name="HTMLPurifier/URIDefinition.php">
|
|
||||||
<line>65</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/URIFilter/Munge.php">
|
|
||||||
<line>46</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="URI.Host">
|
|
||||||
<file name="HTMLPurifier/URIDefinition.php">
|
|
||||||
<line>76</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/URIScheme.php">
|
|
||||||
<line>89</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="URI.Base">
|
|
||||||
<file name="HTMLPurifier/URIDefinition.php">
|
|
||||||
<line>77</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="URI.DefaultScheme">
|
|
||||||
<file name="HTMLPurifier/URIDefinition.php">
|
|
||||||
<line>84</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="URI.AllowedSchemes">
|
|
||||||
<file name="HTMLPurifier/URISchemeRegistry.php">
|
|
||||||
<line>48</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="URI.OverrideAllowedSchemes">
|
|
||||||
<file name="HTMLPurifier/URISchemeRegistry.php">
|
|
||||||
<line>49</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="CSS.AllowDuplicates">
|
|
||||||
<file name="HTMLPurifier/AttrDef/CSS.php">
|
|
||||||
<line>28</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="URI.Disable">
|
|
||||||
<file name="HTMLPurifier/AttrDef/URI.php">
|
|
||||||
<line>47</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.ColorKeywords">
|
|
||||||
<file name="HTMLPurifier/AttrDef/CSS/Color.php">
|
|
||||||
<line>29</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/AttrDef/HTML/Color.php">
|
|
||||||
<line>19</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="CSS.AllowedFonts">
|
|
||||||
<file name="HTMLPurifier/AttrDef/CSS/FontFamily.php">
|
|
||||||
<line>64</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Attr.AllowedClasses">
|
|
||||||
<file name="HTMLPurifier/AttrDef/HTML/Class.php">
|
|
||||||
<line>33</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Attr.ForbiddenClasses">
|
|
||||||
<file name="HTMLPurifier/AttrDef/HTML/Class.php">
|
|
||||||
<line>34</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Attr.AllowedFrameTargets">
|
|
||||||
<file name="HTMLPurifier/AttrDef/HTML/FrameTarget.php">
|
|
||||||
<line>32</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Attr.EnableID">
|
|
||||||
<file name="HTMLPurifier/AttrDef/HTML/ID.php">
|
|
||||||
<line>41</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Attr.IDPrefix">
|
|
||||||
<file name="HTMLPurifier/AttrDef/HTML/ID.php">
|
|
||||||
<line>51</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Attr.IDPrefixLocal">
|
|
||||||
<file name="HTMLPurifier/AttrDef/HTML/ID.php">
|
|
||||||
<line>53</line>
|
|
||||||
<line>58</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Attr.ID.HTML5">
|
|
||||||
<file name="HTMLPurifier/AttrDef/HTML/ID.php">
|
|
||||||
<line>75</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Attr.IDBlacklistRegexp">
|
|
||||||
<file name="HTMLPurifier/AttrDef/HTML/ID.php">
|
|
||||||
<line>97</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Attr.">
|
|
||||||
<file name="HTMLPurifier/AttrDef/HTML/LinkTypes.php">
|
|
||||||
<line>46</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.AllowHostnameUnderscore">
|
|
||||||
<file name="HTMLPurifier/AttrDef/URI/Host.php">
|
|
||||||
<line>77</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.EnableIDNA">
|
|
||||||
<file name="HTMLPurifier/AttrDef/URI/Host.php">
|
|
||||||
<line>109</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Attr.DefaultTextDir">
|
|
||||||
<file name="HTMLPurifier/AttrTransform/BdoDir.php">
|
|
||||||
<line>22</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.RemoveInvalidImg">
|
|
||||||
<file name="HTMLPurifier/AttrTransform/ImgRequired.php">
|
|
||||||
<line>24</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/Strategy/RemoveForeignElements.php">
|
|
||||||
<line>27</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Attr.DefaultInvalidImage">
|
|
||||||
<file name="HTMLPurifier/AttrTransform/ImgRequired.php">
|
|
||||||
<line>27</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Attr.DefaultImageAlt">
|
|
||||||
<file name="HTMLPurifier/AttrTransform/ImgRequired.php">
|
|
||||||
<line>33</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Attr.DefaultInvalidImageAlt">
|
|
||||||
<file name="HTMLPurifier/AttrTransform/ImgRequired.php">
|
|
||||||
<line>40</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.Attr.Name.UseCDATA">
|
|
||||||
<file name="HTMLPurifier/AttrTransform/Name.php">
|
|
||||||
<line>18</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/HTMLModule/Name.php">
|
|
||||||
<line>19</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.FlashAllowFullScreen">
|
|
||||||
<file name="HTMLPurifier/AttrTransform/SafeParam.php">
|
|
||||||
<line>53</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Cache.SerializerPath">
|
|
||||||
<file name="HTMLPurifier/DefinitionCache/Serializer.php">
|
|
||||||
<line>185</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Cache.SerializerPermissions">
|
|
||||||
<file name="HTMLPurifier/DefinitionCache/Serializer.php">
|
|
||||||
<line>202</line>
|
|
||||||
<line>218</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Filter.ExtractStyleBlocks.TidyImpl">
|
|
||||||
<file name="HTMLPurifier/Filter/ExtractStyleBlocks.php">
|
|
||||||
<line>94</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Filter.ExtractStyleBlocks.Scope">
|
|
||||||
<file name="HTMLPurifier/Filter/ExtractStyleBlocks.php">
|
|
||||||
<line>125</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Filter.ExtractStyleBlocks.Escaping">
|
|
||||||
<file name="HTMLPurifier/Filter/ExtractStyleBlocks.php">
|
|
||||||
<line>330</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.Forms">
|
|
||||||
<file name="HTMLPurifier/HTMLModule/Forms.php">
|
|
||||||
<line>31</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.SafeIframe">
|
|
||||||
<file name="HTMLPurifier/HTMLModule/Iframe.php">
|
|
||||||
<line>28</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/URIFilter/SafeIframe.php">
|
|
||||||
<line>48</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.MaxImgLength">
|
|
||||||
<file name="HTMLPurifier/HTMLModule/Image.php">
|
|
||||||
<line>21</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/HTMLModule/SafeEmbed.php">
|
|
||||||
<line>18</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/HTMLModule/SafeObject.php">
|
|
||||||
<line>24</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.TidyLevel">
|
|
||||||
<file name="HTMLPurifier/HTMLModule/Tidy.php">
|
|
||||||
<line>50</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.TidyAdd">
|
|
||||||
<file name="HTMLPurifier/HTMLModule/Tidy.php">
|
|
||||||
<line>54</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.TidyRemove">
|
|
||||||
<file name="HTMLPurifier/HTMLModule/Tidy.php">
|
|
||||||
<line>55</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="AutoFormat.PurifierLinkify.DocURL">
|
|
||||||
<file name="HTMLPurifier/Injector/PurifierLinkify.php">
|
|
||||||
<line>31</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="AutoFormat.RemoveEmpty.RemoveNbsp">
|
|
||||||
<file name="HTMLPurifier/Injector/RemoveEmpty.php">
|
|
||||||
<line>46</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions">
|
|
||||||
<file name="HTMLPurifier/Injector/RemoveEmpty.php">
|
|
||||||
<line>47</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="AutoFormat.RemoveEmpty.Predicate">
|
|
||||||
<file name="HTMLPurifier/Injector/RemoveEmpty.php">
|
|
||||||
<line>48</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.AggressivelyFixLt">
|
|
||||||
<file name="HTMLPurifier/Lexer/DOMLex.php">
|
|
||||||
<line>54</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.AllowParseManyTags">
|
|
||||||
<file name="HTMLPurifier/Lexer/DOMLex.php">
|
|
||||||
<line>72</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.DirectLexLineNumberSyncInterval">
|
|
||||||
<file name="HTMLPurifier/Lexer/DirectLex.php">
|
|
||||||
<line>84</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.DisableExcludes">
|
|
||||||
<file name="HTMLPurifier/Strategy/FixNesting.php">
|
|
||||||
<line>54</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="Core.EscapeInvalidTags">
|
|
||||||
<file name="HTMLPurifier/Strategy/MakeWellFormed.php">
|
|
||||||
<line>72</line>
|
|
||||||
</file>
|
|
||||||
<file name="HTMLPurifier/Strategy/RemoveForeignElements.php">
|
|
||||||
<line>26</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.AllowedComments">
|
|
||||||
<file name="HTMLPurifier/Strategy/RemoveForeignElements.php">
|
|
||||||
<line>31</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="HTML.AllowedCommentsRegexp">
|
|
||||||
<file name="HTMLPurifier/Strategy/RemoveForeignElements.php">
|
|
||||||
<line>32</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="URI.HostBlacklist">
|
|
||||||
<file name="HTMLPurifier/URIFilter/HostBlacklist.php">
|
|
||||||
<line>25</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="URI.MungeResources">
|
|
||||||
<file name="HTMLPurifier/URIFilter/Munge.php">
|
|
||||||
<line>48</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="URI.MungeSecretKey">
|
|
||||||
<file name="HTMLPurifier/URIFilter/Munge.php">
|
|
||||||
<line>49</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
<directive id="URI.SafeIframeRegexp">
|
|
||||||
<file name="HTMLPurifier/URIFilter/SafeIframe.php">
|
|
||||||
<line>35</line>
|
|
||||||
</file>
|
|
||||||
</directive>
|
|
||||||
</usage>
|
|
|
@ -1,26 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<meta name="description" content="Specification for HTML Purifier's advanced API for defining custom filtering behavior." />
|
|
||||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
|
||||||
|
|
||||||
<title>Advanced API - HTML Purifier</title>
|
|
||||||
|
|
||||||
</head><body>
|
|
||||||
|
|
||||||
<h1>Advanced API</h1>
|
|
||||||
|
|
||||||
<div id="filing">Filed under Development</div>
|
|
||||||
<div id="index">Return to the <a href="index.html">index</a>.</div>
|
|
||||||
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Please see <a href="enduser-customize.html">Customize!</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body></html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
|
@ -1,30 +0,0 @@
|
||||||
|
|
||||||
Code Quality Issues
|
|
||||||
|
|
||||||
Okay, face it. Programmers can get lazy, cut corners, or make mistakes. They
|
|
||||||
also can do quick prototypes, and then forget to rewrite them later. Well,
|
|
||||||
while I can't list mistakes in here, I can list prototype-like segments
|
|
||||||
of code that should be aggressively refactored. This does not list
|
|
||||||
optimization issues, that needs to be done after intense profiling.
|
|
||||||
|
|
||||||
docs/examples/demo.php - ad hoc HTML/PHP soup to the extreme
|
|
||||||
|
|
||||||
AttrDef - a lot of duplication, more generic classes need to be created;
|
|
||||||
a lot of strtolower() calls, no legit casing
|
|
||||||
Class - doesn't support Unicode characters (fringe); uses regular expressions
|
|
||||||
Lang - code duplication; premature optimization
|
|
||||||
Length - easily mistaken for CSSLength
|
|
||||||
URI - multiple regular expressions; missing validation for parts (?)
|
|
||||||
CSS - parser doesn't accept advanced CSS (fringe)
|
|
||||||
Number - constructor interface inconsistent with Integer
|
|
||||||
Strategy
|
|
||||||
FixNesting - cannot bubble nodes out of structures, duplicated checks
|
|
||||||
for special-case parent node
|
|
||||||
RemoveForeignElements - should be run in parallel with MakeWellFormed
|
|
||||||
URIScheme - needs to have callable generic checks
|
|
||||||
mailto - doesn't validate emails, doesn't validate querystring
|
|
||||||
news - doesn't validate opaque path
|
|
||||||
nntp - doesn't constrain path
|
|
||||||
tel - doesn't validate phone numbers, only allows characters '+', '1-9', and 'x'
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
|
@ -1,79 +0,0 @@
|
||||||
|
|
||||||
Configuration Backwards-Compatibility Breaks
|
|
||||||
|
|
||||||
In version 4.0.0, the configuration subsystem (composed of the outwards
|
|
||||||
facing Config class, as well as the ConfigSchema and ConfigSchema_Interchange
|
|
||||||
subsystems), was significantly revamped to make use of property lists.
|
|
||||||
While most of the changes are internal, some internal APIs were changed for the
|
|
||||||
sake of clarity. HTMLPurifier_Config was kept completely backwards compatible,
|
|
||||||
although some of the functions were retrofitted with an unambiguous alternate
|
|
||||||
syntax. Both of these changes are discussed in this document.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
1. Outwards Facing Changes
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
The HTMLPurifier_Config class now takes an alternate syntax. The general rule
|
|
||||||
is:
|
|
||||||
|
|
||||||
If you passed $namespace, $directive, pass "$namespace.$directive"
|
|
||||||
instead.
|
|
||||||
|
|
||||||
An example:
|
|
||||||
|
|
||||||
$config->set('HTML', 'Allowed', 'p');
|
|
||||||
|
|
||||||
becomes:
|
|
||||||
|
|
||||||
$config->set('HTML.Allowed', 'p');
|
|
||||||
|
|
||||||
New configuration options may have more than one namespace, they might
|
|
||||||
look something like %Filter.YouTube.Blacklist. While you could technically
|
|
||||||
set it with ('HTML', 'YouTube.Blacklist'), the logical extension
|
|
||||||
('HTML', 'YouTube', 'Blacklist') does not work.
|
|
||||||
|
|
||||||
The old API will still work, but will emit E_USER_NOTICEs.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
2. Internal API Changes
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Some overarching notes: we've completely eliminated the notion of namespace;
|
|
||||||
it's now an informal construct for organizing related configuration directives.
|
|
||||||
|
|
||||||
Also, the validation routines for keys (formerly "$namespace.$directive")
|
|
||||||
have been completely relaxed. I don't think it really should be necessary.
|
|
||||||
|
|
||||||
2.1 HTMLPurifier_ConfigSchema
|
|
||||||
|
|
||||||
First off, if you're interfacing with this class, you really shouldn't.
|
|
||||||
HTMLPurifier_ConfigSchema_Builder_ConfigSchema is really the only class that
|
|
||||||
should ever be creating HTMLPurifier_ConfigSchema, and HTMLPurifier_Config the
|
|
||||||
only class that should be reading it.
|
|
||||||
|
|
||||||
All namespace related methods were removed; they are completely unnecessary
|
|
||||||
now. Any $namespace, $name arguments must be replaced with $key (where
|
|
||||||
$key == "$namespace.$name"), including for addAlias().
|
|
||||||
|
|
||||||
The $info and $defaults member variables are no longer indexed as
|
|
||||||
[$namespace][$name]; they are now indexed as ["$namespace.$name"].
|
|
||||||
|
|
||||||
All deprecated methods were finally removed, after having yelled at you as
|
|
||||||
an E_USER_NOTICE for a while now.
|
|
||||||
|
|
||||||
2.2 HTMLPurifier_ConfigSchema_Interchange
|
|
||||||
|
|
||||||
Member variable $namespaces was removed.
|
|
||||||
|
|
||||||
2.3 HTMLPurifier_ConfigSchema_Interchange_Id
|
|
||||||
|
|
||||||
Member variable $namespace and $directive removed; member variable $key added.
|
|
||||||
Any method that took $namespace, $directive now takes $key.
|
|
||||||
|
|
||||||
2.4 HTMLPurifier_ConfigSchema_Interchange_Namespace
|
|
||||||
|
|
||||||
Removed.
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
|
@ -1,165 +0,0 @@
|
||||||
Configuration naming
|
|
||||||
|
|
||||||
HTML Purifier 4.0.0 features a new configuration naming system that
|
|
||||||
allows arbitrary nesting of namespaces. While there are certain cases
|
|
||||||
in which using two namespaces is obviously better (the canonical example
|
|
||||||
is where we were using AutoFormatParam to contain directives for AutoFormat
|
|
||||||
parameters), it is unclear whether or not a general migration to highly
|
|
||||||
namespaced directives is a good idea or not.
|
|
||||||
|
|
||||||
== Case studies ==
|
|
||||||
|
|
||||||
=== Attr.* ===
|
|
||||||
|
|
||||||
We have a dead duck HTML.Attr.Name.UseCDATA which migrated before we decided
|
|
||||||
to think this out thoroughly.
|
|
||||||
|
|
||||||
We currently have a large number of directives in the Attr.* namespace.
|
|
||||||
These directives tweak the behavior of some HTML attributes. They have
|
|
||||||
the properties:
|
|
||||||
|
|
||||||
* While they apply to only one attribute at a time, the attribute can
|
|
||||||
span over multiple elements (not necessarily all attributes, either).
|
|
||||||
The information of which elements it impacts is either omitted or
|
|
||||||
informally stated (EnableID applies to all elements, DefaultImageAlt
|
|
||||||
applies to <img> tags, AllowedRev doesn't say but only applies to a tags).
|
|
||||||
|
|
||||||
* There is a certain degree of clustering that could be applied, especially
|
|
||||||
to the ID directives. The clustering could be done with respect to
|
|
||||||
what element/attribute was used, i.e.
|
|
||||||
|
|
||||||
*.id -> EnableID, IDBlacklistRegexp, IDBlacklist, IDPrefixLocal, IDPrefix
|
|
||||||
img.src -> DefaultInvalidImage
|
|
||||||
img.alt -> DefaultImageAlt, DefaultInvalidImageAlt
|
|
||||||
bdo.dir -> DefaultTextDir
|
|
||||||
a.rel -> AllowedRel
|
|
||||||
a.rev -> AllowedRev
|
|
||||||
a.target -> AllowedFrameTargets
|
|
||||||
a.name -> Name.UseCDATA
|
|
||||||
|
|
||||||
* The directives often reference generic attribute types that were specified
|
|
||||||
in the DTD/specification. However, some of the behavior specifically relies
|
|
||||||
on the fact that other use cases of the attribute are not, at current,
|
|
||||||
supported by HTML Purifier.
|
|
||||||
|
|
||||||
AllowedRel, AllowedRev -> heavily <a> specific; if <link> ends up being
|
|
||||||
allowed, we will also have to give users specificity there (we also
|
|
||||||
want to preserve generality) DTD %Linktypes, HTML5 distinguishes
|
|
||||||
between <link> and <a>/<area>
|
|
||||||
AllowedFrameTargets -> heavily <a> specific, but also used by <area>
|
|
||||||
and <form>. Transitional DTD %FrameTarget, not present in strict,
|
|
||||||
HTML5 calls them "browsing contexts"
|
|
||||||
Default*Image* -> as a default parameter, is almost entirely exlcusive
|
|
||||||
to <img>
|
|
||||||
EnableID -> global attribute
|
|
||||||
Name.UseCDATA -> heavily <a> specific, but has heavy other usage by
|
|
||||||
many things
|
|
||||||
|
|
||||||
== AutoFormat.* ==
|
|
||||||
|
|
||||||
These have the fairly normal pluggable architecture that lends itself to
|
|
||||||
large amounts of namespaces (pluggability may be the key to figuring
|
|
||||||
out when gratuitous namespacing is good.) Properties:
|
|
||||||
|
|
||||||
* Boolean directives are fair game for being namespaced: for example,
|
|
||||||
RemoveEmpty.RemoveNbsp triggers RemoveEmpty.RemoveNbsp.Exceptions,
|
|
||||||
the latter of which only makes sense when RemoveEmpty.RemoveNbsp
|
|
||||||
is set to true. (The same applies to RemoveNbsp too)
|
|
||||||
|
|
||||||
The AutoFormat string is a bit long, but is the only bit of repeated
|
|
||||||
context.
|
|
||||||
|
|
||||||
== Core.* ==
|
|
||||||
|
|
||||||
Core is the potpourri of directives, mostly regarding some minor behavioral
|
|
||||||
tweaks for HTML handling abilities.
|
|
||||||
|
|
||||||
AggressivelyFixLt
|
|
||||||
AllowParseManyTags
|
|
||||||
ConvertDocumentToFragment
|
|
||||||
DirectLexLineNumberSyncInterval
|
|
||||||
LexerImpl
|
|
||||||
MaintainLineNumbers
|
|
||||||
Lexer
|
|
||||||
CollectErrors
|
|
||||||
Language
|
|
||||||
Error handling (Language is ostensibly a little more general, but
|
|
||||||
it's only used for error handling right now)
|
|
||||||
ColorKeywords
|
|
||||||
CSS and HTML
|
|
||||||
Encoding
|
|
||||||
EscapeNonASCIICharacters
|
|
||||||
Character encoding
|
|
||||||
EscapeInvalidChildren
|
|
||||||
EscapeInvalidTags
|
|
||||||
HiddenElements
|
|
||||||
RemoveInvalidImg
|
|
||||||
Lexing/Output
|
|
||||||
RemoveScriptContents
|
|
||||||
Deprecated
|
|
||||||
|
|
||||||
== HTML.* ==
|
|
||||||
|
|
||||||
AllowedAttributes
|
|
||||||
AllowedElements
|
|
||||||
AllowedModules
|
|
||||||
Allowed
|
|
||||||
ForbiddenAttributes
|
|
||||||
ForbiddenElements
|
|
||||||
Element set tuning
|
|
||||||
BlockWrapper
|
|
||||||
Child def advanced twiddle
|
|
||||||
CoreModules
|
|
||||||
CustomDoctype
|
|
||||||
Advanced HTMLModuleManager twiddles
|
|
||||||
DefinitionID
|
|
||||||
DefinitionRev
|
|
||||||
Caching
|
|
||||||
Doctype
|
|
||||||
Parent
|
|
||||||
Strict
|
|
||||||
XHTML
|
|
||||||
Global environment
|
|
||||||
MaxImgLength
|
|
||||||
Attribute twiddle? (applies to two attributes)
|
|
||||||
Proprietary
|
|
||||||
SafeEmbed
|
|
||||||
SafeObject
|
|
||||||
Trusted
|
|
||||||
Extra functionality/tagsets
|
|
||||||
TidyAdd
|
|
||||||
TidyLevel
|
|
||||||
TidyRemove
|
|
||||||
Tidy
|
|
||||||
|
|
||||||
== Output.* ==
|
|
||||||
|
|
||||||
These directly affect the output of Generator. These are all advanced
|
|
||||||
twiddles.
|
|
||||||
|
|
||||||
== URI.* ==
|
|
||||||
|
|
||||||
AllowedSchemes
|
|
||||||
OverrideAllowedSchemes
|
|
||||||
Scheme tuning
|
|
||||||
Base
|
|
||||||
DefaultScheme
|
|
||||||
Host
|
|
||||||
Global environment
|
|
||||||
DefinitionID
|
|
||||||
DefinitionRev
|
|
||||||
Caching
|
|
||||||
DisableExternalResources
|
|
||||||
DisableExternal
|
|
||||||
DisableResources
|
|
||||||
Disable
|
|
||||||
Contextual/authority tuning
|
|
||||||
HostBlacklist
|
|
||||||
Authority tuning
|
|
||||||
MakeAbsolute
|
|
||||||
MungeResources
|
|
||||||
MungeSecretKey
|
|
||||||
Munge
|
|
||||||
Transformation behavior (munge can be grouped)
|
|
||||||
|
|
||||||
|
|
|
@ -1,412 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<meta name="description" content="Describes config schema framework in HTML Purifier." />
|
|
||||||
<link rel="stylesheet" type="text/css" href="./style.css" />
|
|
||||||
<title>Config Schema - HTML Purifier</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>Config Schema</h1>
|
|
||||||
|
|
||||||
<div id="filing">Filed under Development</div>
|
|
||||||
<div id="index">Return to the <a href="index.html">index</a>.</div>
|
|
||||||
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
HTML Purifier has a fairly complex system for configuration. Users
|
|
||||||
interact with a <code>HTMLPurifier_Config</code> object to
|
|
||||||
set configuration directives. The values they set are validated according
|
|
||||||
to a configuration schema, <code>HTMLPurifier_ConfigSchema</code>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The schema is mostly transparent to end-users, but if you're doing development
|
|
||||||
work for HTML Purifier and need to define a new configuration directive,
|
|
||||||
you'll need to interact with it. We'll also talk about how to define
|
|
||||||
userspace configuration directives at the very end.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>Write a directive file</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Directive files define configuration directives to be used by
|
|
||||||
HTML Purifier. They are placed in <code>library/HTMLPurifier/ConfigSchema/schema/</code>
|
|
||||||
in the form <code><em>Namespace</em>.<em>Directive</em>.txt</code> (I
|
|
||||||
couldn't think of a more descriptive file extension.)
|
|
||||||
Directive files are actually what we call <code>StringHash</code>es,
|
|
||||||
i.e. associative arrays represented in a string form reminiscent of
|
|
||||||
<a href="http://qa.php.net/write-test.php">PHPT</a> tests. Here's a
|
|
||||||
sample directive file, <code>Test.Sample.txt</code>:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>Test.Sample
|
|
||||||
TYPE: string/null
|
|
||||||
DEFAULT: NULL
|
|
||||||
ALLOWED: 'foo', 'bar'
|
|
||||||
VALUE-ALIASES: 'baz' => 'bar'
|
|
||||||
VERSION: 3.1.0
|
|
||||||
--DESCRIPTION--
|
|
||||||
This is a sample configuration directive for the purposes of the
|
|
||||||
<code>dev-config-schema.html<code> documentation.
|
|
||||||
--ALIASES--
|
|
||||||
Test.Example</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Each of these segments has a specific meaning:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Key</th>
|
|
||||||
<th>Example</th>
|
|
||||||
<th>Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>ID</td>
|
|
||||||
<td>Test.Sample</td>
|
|
||||||
<td>The name of the directive, in the form Namespace.Directive
|
|
||||||
(implicitly the first line)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>TYPE</td>
|
|
||||||
<td>string/null</td>
|
|
||||||
<td>The type of variable this directive accepts. See below for
|
|
||||||
details. You can also add <code>/null</code> to the end of
|
|
||||||
any basic type to allow null values too.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>DEFAULT</td>
|
|
||||||
<td>NULL</td>
|
|
||||||
<td>A parseable PHP expression of the default value.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>DESCRIPTION</td>
|
|
||||||
<td>This is a...</td>
|
|
||||||
<td>An HTML description of what this directive does.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>VERSION</td>
|
|
||||||
<td>3.1.0</td>
|
|
||||||
<td><em>Recommended</em>. The version of HTML Purifier this directive was added.
|
|
||||||
Directives that have been around since 1.0.0 don't have this,
|
|
||||||
but any new ones should.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>ALIASES</td>
|
|
||||||
<td>Test.Example</td>
|
|
||||||
<td><em>Optional</em>. A comma separated list of aliases for this directive.
|
|
||||||
This is most useful for backwards compatibility and should
|
|
||||||
not be used otherwise.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>ALLOWED</td>
|
|
||||||
<td>'foo', 'bar'</td>
|
|
||||||
<td><em>Optional</em>. Set of allowed value for a directive,
|
|
||||||
a comma separated list of parseable PHP expressions. This
|
|
||||||
is only allowed string, istring, text and itext TYPEs.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>VALUE-ALIASES</td>
|
|
||||||
<td>'baz' => 'bar'</td>
|
|
||||||
<td><em>Optional</em>. Mapping of one value to another, and
|
|
||||||
should be a comma separated list of keypair duples. This
|
|
||||||
is only allowed string, istring, text and itext TYPEs.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>DEPRECATED-VERSION</td>
|
|
||||||
<td>3.1.0</td>
|
|
||||||
<td><em>Not shown</em>. Indicates that the directive was
|
|
||||||
deprecated this version.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>DEPRECATED-USE</td>
|
|
||||||
<td>Test.NewDirective</td>
|
|
||||||
<td><em>Not shown</em>. Indicates what new directive should be
|
|
||||||
used instead. Note that the directives will functionally be
|
|
||||||
different, although they should offer the same functionality.
|
|
||||||
If they are identical, use an alias instead.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>EXTERNAL</td>
|
|
||||||
<td>CSSTidy</td>
|
|
||||||
<td><em>Not shown</em>. Indicates if there is an external library
|
|
||||||
the user will need to download and install to use this configuration
|
|
||||||
directive. As of right now, this is merely a Google-able name; future
|
|
||||||
versions may also provide links and instructions.</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Some notes on format and style:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
Each of these keys can be expressed in the short format
|
|
||||||
(<code>KEY: Value</code>) or the long format
|
|
||||||
(<code>--KEY--</code> with value beneath). You must use the
|
|
||||||
long format if multiple lines are needed, or if a long format
|
|
||||||
has been used already (that's why <code>ALIASES</code> in our
|
|
||||||
example is in the long format); otherwise, it's user preference.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
The HTML descriptions should be wrapped at about 80 columns; do
|
|
||||||
not rely on editor word-wrapping.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Also, as promised, here is the set of possible types:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Type</th>
|
|
||||||
<th>Example</th>
|
|
||||||
<th>Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>string</td>
|
|
||||||
<td>'Foo'</td>
|
|
||||||
<td><a href="http://docs.php.net/manual/en/language.types.string.php">String</a> without newlines</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>istring</td>
|
|
||||||
<td>'foo'</td>
|
|
||||||
<td>Case insensitive ASCII string without newlines</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>text</td>
|
|
||||||
<td>"A<em>\n</em>b"</td>
|
|
||||||
<td>String with newlines</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>itext</td>
|
|
||||||
<td>"a<em>\n</em>b"</td>
|
|
||||||
<td>Case insensitive ASCII string without newlines</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>int</td>
|
|
||||||
<td>23</td>
|
|
||||||
<td>Integer</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>float</td>
|
|
||||||
<td>3.0</td>
|
|
||||||
<td>Floating point number</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>bool</td>
|
|
||||||
<td>true</td>
|
|
||||||
<td>Boolean</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>lookup</td>
|
|
||||||
<td>array('key' => true)</td>
|
|
||||||
<td>Lookup array, used with <code>isset($var[$key])</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>list</td>
|
|
||||||
<td>array('f', 'b')</td>
|
|
||||||
<td>List array, with ordered numerical indexes</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>hash</td>
|
|
||||||
<td>array('key' => 'val')</td>
|
|
||||||
<td>Associative array of keys to values</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>mixed</td>
|
|
||||||
<td>new stdClass</td>
|
|
||||||
<td>Any PHP variable is fine</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The examples represent what will be returned out of the configuration
|
|
||||||
object; users have a little bit of leeway when setting configuration
|
|
||||||
values (for example, a lookup value can be specified as a list;
|
|
||||||
HTML Purifier will flip it as necessary.) These types are defined
|
|
||||||
in <a href="http://repo.or.cz/w/htmlpurifier.git?a=blob;hb=HEAD;f=library/HTMLPurifier/VarParser.php">
|
|
||||||
library/HTMLPurifier/VarParser.php</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For more information on what values are allowed, and how they are parsed,
|
|
||||||
consult <a href="http://repo.or.cz/w/htmlpurifier.git?a=blob;hb=HEAD;f=library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php">
|
|
||||||
library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php</a>, as well
|
|
||||||
as <a href="http://repo.or.cz/w/htmlpurifier.git?a=blob;hb=HEAD;f=library/HTMLPurifier/ConfigSchema/Interchange/Directive.php">
|
|
||||||
library/HTMLPurifier/ConfigSchema/Interchange/Directive.php</a> for
|
|
||||||
the semantics of the parsed values.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>Refreshing the cache</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You may have noticed that your directive file isn't doing anything
|
|
||||||
yet. That's because it hasn't been added to the runtime
|
|
||||||
<code>HTMLPurifier_ConfigSchema</code> instance. Run
|
|
||||||
<code>maintenance/generate-schema-cache.php</code> to fix this.
|
|
||||||
If there were no errors, you're good to go! Don't forget to add
|
|
||||||
some unit tests for your functionality!
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
If you ever make changes to your configuration directives, you
|
|
||||||
will need to run this script again.
|
|
||||||
</p>
|
|
||||||
<h2>Adding in-house schema definitions</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Placing stuff directly in HTML Purifier's source tree is generally not a
|
|
||||||
good idea, so HTML Purifier 4.0.0+ has some facilities in place to make your
|
|
||||||
life easier.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The first is to pass an extra parameter to <code>maintenance/generate-schema-cache.php</code>
|
|
||||||
with the location of your directory (relative or absolute path will do). For example,
|
|
||||||
if I'm storing my custom definitions in <em>/var/htmlpurifier/myschema</em>, run:
|
|
||||||
<code>php maintenance/generate-schema-cache.php /var/htmlpurifier/myschema</code>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Alternatively, you can create a small loader PHP file in the HTML Purifier base
|
|
||||||
directory named <code>config-schema.php</code> (this is the same directory
|
|
||||||
you would place a <code>test-settings.php</code> file). In this file, add
|
|
||||||
the following line for each directory you want to load:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>$builder->buildDir($interchange, '/var/htmlpurifier/myschema');</pre>
|
|
||||||
|
|
||||||
<p>You can even load a single file using:</p>
|
|
||||||
|
|
||||||
<pre>$builder->buildFile($interchange, '/var/htmlpurifier/myschema/MyApp.Directive.txt');</pre>
|
|
||||||
|
|
||||||
<p>Storing custom definitions that you don't plan on sending back upstream in
|
|
||||||
a separate directory is <em>definitely</em> a good idea! Additionally, picking
|
|
||||||
a good namespace can go a long way to saving you grief if you want to use
|
|
||||||
someone else's change, but they picked the same name, or if HTML Purifier
|
|
||||||
decides to add support for a configuration directive that has the same name.</p>
|
|
||||||
|
|
||||||
<!-- TODO: how to name directives that rely on naming conventions -->
|
|
||||||
|
|
||||||
<h2>Errors</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
All directive files go through a rigorous validation process
|
|
||||||
through <a href="http://repo.or.cz/w/htmlpurifier.git?a=blob;hb=HEAD;f=library/HTMLPurifier/ConfigSchema/Validator.php">
|
|
||||||
library/HTMLPurifier/ConfigSchema/Validator.php</a>, as well
|
|
||||||
as some basic checks during building. While
|
|
||||||
listing every error out here is out-of-scope for this document, we
|
|
||||||
can give some general tips for interpreting error messages.
|
|
||||||
There are two types of errors: builder errors and validation errors.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>Builder errors</h3>
|
|
||||||
|
|
||||||
<blockquote>
|
|
||||||
<p>
|
|
||||||
<strong>Exception:</strong> Expected type string, got
|
|
||||||
integer in DEFAULT in directive hash 'Ns.Dir'
|
|
||||||
</p>
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can identify a builder error by the keyword "directive hash."
|
|
||||||
These are the easiest to deal with, because they directly correspond
|
|
||||||
with your directive file. Find the offending directive file (which
|
|
||||||
is the directive hash plus the .txt extension), find the
|
|
||||||
offending index ("in DEFAULT" means the DEFAULT key) and fix the error.
|
|
||||||
This particular error would occur if your default value is not the same
|
|
||||||
type as TYPE.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>Validation errors</h3>
|
|
||||||
|
|
||||||
<blockquote>
|
|
||||||
<p>
|
|
||||||
<strong>Exception:</strong> Alias 3 in valueAliases in directive
|
|
||||||
'Ns.Dir' must be a string
|
|
||||||
</p>
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
These are a little trickier, because we're not actually validating
|
|
||||||
your directive file, or even the direct string hash representation.
|
|
||||||
We're validating an Interchange object, and the error messages do
|
|
||||||
not mention any string hash keys.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Nevertheless, it's not difficult to figure out what went wrong.
|
|
||||||
Read the "context" statements in reverse:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>in directive 'Ns.Dir'</dt>
|
|
||||||
<dd>This means we need to look at the directive file <code>Ns.Dir.txt</code></dd>
|
|
||||||
<dt>in valueAliases</dt>
|
|
||||||
<dd>There's no key actually called this, but there's one that's close:
|
|
||||||
VALUE-ALIASES. Indeed, that's where to look.</dd>
|
|
||||||
<dt>Alias 3</dt>
|
|
||||||
<dd>The value alias that is equal to 3 is the culprit.</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
In this particular case, you're not allowed to alias integers values to
|
|
||||||
strings values.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The most difficult part is translating the Interchange member variable (valueAliases)
|
|
||||||
into a directive file key (VALUE-ALIASES), but there's a one-to-one
|
|
||||||
correspondence currently. If the two formats diverge, any discrepancies
|
|
||||||
will be described in <a href="http://repo.or.cz/w/htmlpurifier.git?a=blob;hb=HEAD;f=library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php">
|
|
||||||
library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>Internals</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Much of the configuration schema framework's codebase deals with
|
|
||||||
shuffling data from one format to another, and doing validation on this
|
|
||||||
data.
|
|
||||||
The keystone of all of this is the <code>HTMLPurifier_ConfigSchema_Interchange</code>
|
|
||||||
class, which represents the purest, parsed representation of the schema.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Hand-writing this data is unwieldy, however, so we write directive files.
|
|
||||||
These directive files are parsed by <code>HTMLPurifier_StringHashParser</code>
|
|
||||||
into <code>HTMLPurifier_StringHash</code>es, which then
|
|
||||||
are run through <code>HTMLPurifier_ConfigSchema_InterchangeBuilder</code>
|
|
||||||
to construct the interchange object.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
From the interchange object, the data can be siphoned into other forms
|
|
||||||
using <code>HTMLPurifier_ConfigSchema_Builder</code> subclasses.
|
|
||||||
For example, <code>HTMLPurifier_ConfigSchema_Builder_ConfigSchema</code>
|
|
||||||
generates a runtime <code>HTMLPurifier_ConfigSchema</code> object,
|
|
||||||
which <code>HTMLPurifier_Config</code> uses to validate its incoming
|
|
||||||
data. There is also an XML serializer, which is used to build documentation.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
68
vendor/ezyang/htmlpurifier/docs/dev-flush.html
vendored
|
@ -1,68 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<meta name="description" content="Discusses when to flush HTML Purifier's various caches." />
|
|
||||||
<link rel="stylesheet" type="text/css" href="./style.css" />
|
|
||||||
<title>Flushing the Purifier - HTML Purifier</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>Flushing the Purifier</h1>
|
|
||||||
|
|
||||||
<div id="filing">Filed under Development</div>
|
|
||||||
<div id="index">Return to the <a href="index.html">index</a>.</div>
|
|
||||||
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
If you've been poking around the various folders in HTML Purifier,
|
|
||||||
you may have noticed the <code>maintenance</code> directory. Almost
|
|
||||||
all of these scripts are devoted to flushing out the various caches
|
|
||||||
HTML Purifier uses. Normal users don't have to worry about this:
|
|
||||||
regular library usage is transparent. However, when doing development
|
|
||||||
work on HTML Purifier, you may find you have to flush one of the
|
|
||||||
caches.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
As a general rule of thumb, run <code>flush.php</code> whenever you make
|
|
||||||
any <em>major</em> changes, or when tests start mysteriously failing.
|
|
||||||
In more detail, run this script if:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
You added new source files to HTML Purifier's main library.
|
|
||||||
(see <code>generate-includes.php</code>)
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
You modified the configuration schema (see
|
|
||||||
<code>generate-schema-cache.php</code>). This usually means
|
|
||||||
adding or modifying files in <code>HTMLPurifier/ConfigSchema/schema/</code>,
|
|
||||||
although in rare cases modifying <code>HTMLPurifier/ConfigSchema.php</code>
|
|
||||||
will also require this.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
You modified a Definition, or its subsystems. The most usual candidate
|
|
||||||
is <code>HTMLPurifier/HTMLDefinition.php</code>, which also encompasses
|
|
||||||
the files in <code>HTMLPurifier/HTMLModule/</code> as well as if you've
|
|
||||||
<a href="enduser-customize.html">customizing definitions</a> without
|
|
||||||
the cache disabled. (see <code>flush-generation-cache.php</code>)
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
You modified source files, and have been using the standalone
|
|
||||||
version from the full installation. (see <code>generate-standalone.php</code>)
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can check out the corresponding scripts for more information on what they
|
|
||||||
do.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body></html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
281
vendor/ezyang/htmlpurifier/docs/dev-includes.txt
vendored
|
@ -1,281 +0,0 @@
|
||||||
|
|
||||||
INCLUDES, AUTOLOAD, BYTECODE CACHES and OPTIMIZATION
|
|
||||||
|
|
||||||
The Problem
|
|
||||||
-----------
|
|
||||||
|
|
||||||
HTML Purifier contains a number of extra components that are not used all
|
|
||||||
of the time, only if the user explicitly specifies that we should use
|
|
||||||
them.
|
|
||||||
|
|
||||||
Some of these optional components are optionally included (Filter,
|
|
||||||
Language, Lexer, Printer), while others are included all the time
|
|
||||||
(Injector, URIFilter, HTMLModule, URIScheme). We will stipulate that these
|
|
||||||
are all developer specified: it is conceivable that certain Tokens are not
|
|
||||||
used, but this is user-dependent and should not be trusted.
|
|
||||||
|
|
||||||
We should come up with a consistent way to handle these things and ensure
|
|
||||||
that we get the maximum performance when there is bytecode caches and
|
|
||||||
when there are not. Unfortunately, these two goals seem contrary to each
|
|
||||||
other.
|
|
||||||
|
|
||||||
A peripheral issue is the performance of ConfigSchema, which has been
|
|
||||||
shown take a large, constant amount of initialization time, and is
|
|
||||||
intricately linked to the issue of includes due to its pervasive use
|
|
||||||
in our plugin architecture.
|
|
||||||
|
|
||||||
Pros and Cons
|
|
||||||
-------------
|
|
||||||
|
|
||||||
We will assume that user-based extensions will be included by them.
|
|
||||||
|
|
||||||
Conditional includes:
|
|
||||||
Pros:
|
|
||||||
- User management is simplified; only a single directive needs to be set
|
|
||||||
- Only necessary code is included
|
|
||||||
Cons:
|
|
||||||
- Doesn't play nicely with opcode caches
|
|
||||||
- Adds complexity to standalone version
|
|
||||||
- Optional configuration directives are not exposed without a little
|
|
||||||
extra coaxing (not implemented yet)
|
|
||||||
|
|
||||||
Include it all:
|
|
||||||
Pros:
|
|
||||||
- User management is still simple
|
|
||||||
- Plays nicely with opcode caches and standalone version
|
|
||||||
- All configuration directives are present
|
|
||||||
Cons:
|
|
||||||
- Lots of (how much?) extra code is included
|
|
||||||
- Classes that inherit from external libraries will cause compile
|
|
||||||
errors
|
|
||||||
|
|
||||||
Build an include stub (Let's do this!):
|
|
||||||
Pros:
|
|
||||||
- Only necessary code is included
|
|
||||||
- Plays nicely with opcode caches and standalone version
|
|
||||||
- require (without once) can be used, see above
|
|
||||||
- Could further extend as a compilation to one file
|
|
||||||
Cons:
|
|
||||||
- Not implemented yet
|
|
||||||
- Requires user intervention and use of a command line script
|
|
||||||
- Standalone script must be chained to this
|
|
||||||
- More complex and compiled-language-like
|
|
||||||
- Requires a whole new class of system-wide configuration directives,
|
|
||||||
as configuration objects can be reused
|
|
||||||
- Determining what needs to be included can be complex (see above)
|
|
||||||
- No way of autodetecting dynamically instantiated classes
|
|
||||||
- Might be slow
|
|
||||||
|
|
||||||
Include stubs
|
|
||||||
-------------
|
|
||||||
|
|
||||||
This solution may be "just right" for users who are heavily oriented
|
|
||||||
towards performance. However, there are a number of picky implementation
|
|
||||||
details to work out beforehand.
|
|
||||||
|
|
||||||
The number one concern is how to make the HTML Purifier files "work
|
|
||||||
out of the box", while still being able to easily get them into a form
|
|
||||||
that works with this setup. As the codebase stands right now, it would
|
|
||||||
be necessary to strip out all of the require_once calls. The only way
|
|
||||||
we could get rid of the require_once calls is to use __autoload or
|
|
||||||
use the stub for all cases (which might not be a bad idea).
|
|
||||||
|
|
||||||
Aside
|
|
||||||
-----
|
|
||||||
An important thing to remember, however, is that these require_once's
|
|
||||||
are valuable data about what classes a file needs. Unfortunately, there's
|
|
||||||
no distinction between whether or not the file is needed all the time,
|
|
||||||
or whether or not it is one of our "optional" files. Thus, it is
|
|
||||||
effectively useless.
|
|
||||||
|
|
||||||
Deprecated
|
|
||||||
----------
|
|
||||||
One of the things I'd like to do is have the code search for any classes
|
|
||||||
that are explicitly mentioned in the code. If a class isn't mentioned, I
|
|
||||||
get to assume that it is "optional," i.e. included via introspection.
|
|
||||||
The choice is either to use PHP's tokenizer or use regexps; regexps would
|
|
||||||
be faster but a tokenizer would be more correct. If this ends up being
|
|
||||||
unfeasible, adding dependency comments isn't a bad idea. (This could
|
|
||||||
even be done automatically by search/replacing require_once, although
|
|
||||||
we'd have to manually inspect the results for the optional requires.)
|
|
||||||
|
|
||||||
NOTE: This ends up not being necessary, as we're going to make the user
|
|
||||||
figure out all the extra classes they need, and only include the core
|
|
||||||
which is predetermined.
|
|
||||||
|
|
||||||
Using the autoload framework with include stubs works nicely with
|
|
||||||
introspective classes: instead of having to have require_once inside
|
|
||||||
the function, we can let autoload do the work; we simply need to
|
|
||||||
new $class or accept the object straight from the caller. Handling filters
|
|
||||||
becomes a simple matter of ticking off configuration directives, and
|
|
||||||
if ConfigSchema spits out errors, adding the necessary includes. We could
|
|
||||||
also use the autoload framework as a fallback, in case the user forgets
|
|
||||||
to make the include, but doesn't really care about performance.
|
|
||||||
|
|
||||||
Insight
|
|
||||||
-------
|
|
||||||
All of this talk is merely a natural extension of what our current
|
|
||||||
standalone functionality does. However, instead of having our code
|
|
||||||
perform the includes, or attempting to inline everything that possibly
|
|
||||||
could be used, we boot the issue to the user, making them include
|
|
||||||
everything or setup the fallback autoload handler.
|
|
||||||
|
|
||||||
Configuration Schema
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
A common deficiency for all of the conditional include setups (including
|
|
||||||
the dynamically built include PHP stub) is that if one of this
|
|
||||||
conditionally included files includes a configuration directive, it
|
|
||||||
is not accessible to configdoc. A stopgap solution for this problem is
|
|
||||||
to have it piggy-back off of the data in the merge-library.php script
|
|
||||||
to figure out what extra files it needs to include, but if the file also
|
|
||||||
inherits classes that don't exist, we're in big trouble.
|
|
||||||
|
|
||||||
I think it's high time we centralized the configuration documentation.
|
|
||||||
However, the type checking has been a great boon for the library, and
|
|
||||||
I'd like to keep that. The compromise is to use some other source, and
|
|
||||||
then parse it into the ConfigSchema internal format (sans all of those
|
|
||||||
nasty documentation strings which we really don't need at runtime) and
|
|
||||||
serialize that for future use.
|
|
||||||
|
|
||||||
The next question is that of format. XML is very verbose, and the prospect
|
|
||||||
of setting defaults in it gives me willies. However, this may be necessary.
|
|
||||||
Splitting up the file into manageable chunks may alleviate this trouble,
|
|
||||||
and we may be even want to create our own format optimized for specifying
|
|
||||||
configuration. It might look like (based off the PHPT format, which is
|
|
||||||
nicely compact yet unambiguous and human-readable):
|
|
||||||
|
|
||||||
Core.HiddenElements
|
|
||||||
TYPE: lookup
|
|
||||||
DEFAULT: array('script', 'style') // auto-converted during processing
|
|
||||||
--ALIASES--
|
|
||||||
Core.InvisibleElements, Core.StupidElements
|
|
||||||
--DESCRIPTION--
|
|
||||||
<p>
|
|
||||||
Blah blah
|
|
||||||
</p>
|
|
||||||
|
|
||||||
The first line is the directive name, the lines after that prior to the
|
|
||||||
first --HEADER-- block are single-line values, and then after that
|
|
||||||
the multiline values are there. No value is restricted to a particular
|
|
||||||
format: DEFAULT could very well be multiline if that would be easier.
|
|
||||||
This would make it insanely easy, also, to add arbitrary extra parameters,
|
|
||||||
like:
|
|
||||||
|
|
||||||
VERSION: 3.0.0
|
|
||||||
ALLOWED: 'none', 'light', 'medium', 'heavy' // this is wrapped in array()
|
|
||||||
EXTERNAL: CSSTidy // this would be documented somewhere else with a URL
|
|
||||||
|
|
||||||
The final loss would be that you wouldn't know what file the directive
|
|
||||||
was used in; with some clever regexps it should be possible to
|
|
||||||
figure out where $config->get($ns, $d); occurs. Reflective calls to
|
|
||||||
the configuration object is mitigated by the fact that getBatch is
|
|
||||||
used, so we can simply talk about that in the namespace definition page.
|
|
||||||
This might be slow, but it would only happen when we are creating
|
|
||||||
the documentation for consumption, and is sugar.
|
|
||||||
|
|
||||||
We can put this in a schema/ directory, outside of HTML Purifier. The serialized
|
|
||||||
data gets treated like entities.ser.
|
|
||||||
|
|
||||||
The final thing that needs to be handled is user defined configurations.
|
|
||||||
They can be added at runtime using ConfigSchema::registerDirectory()
|
|
||||||
which globs the directory and grabs all of the directives to be incorporated
|
|
||||||
in. Then, the result is saved. We may want to take advantage of the
|
|
||||||
DefinitionCache framework, although it is not altogether certain what
|
|
||||||
configuration directives would be used to generate our key (meta-directives!)
|
|
||||||
|
|
||||||
Further thoughts
|
|
||||||
----------------
|
|
||||||
Our master configuration schema will only need to be updated once
|
|
||||||
every new version, so it's easily versionable. User specified
|
|
||||||
schema files are far more volatile, but it's far too expensive
|
|
||||||
to check the filemtimes of all the files, so a DefinitionRev style
|
|
||||||
mechanism works better. However, we can uniquely identify the
|
|
||||||
schema based on the directories they loaded, so there's no need
|
|
||||||
for a DefinitionId until we give them full programmatic control.
|
|
||||||
|
|
||||||
These variables should be directly incorporated into ConfigSchema,
|
|
||||||
and ConfigSchema should handle serialization. Some refactoring will be
|
|
||||||
necessary for the DefinitionCache classes, as they are built with
|
|
||||||
Config in mind. If the user changes something, the cache file gets
|
|
||||||
rebuilt. If the version changes, the cache file gets rebuilt. Since
|
|
||||||
our unit tests flush the caches before we start, and the operation is
|
|
||||||
pretty fast, this will not negatively impact unit testing.
|
|
||||||
|
|
||||||
One last thing: certain configuration directives require that files
|
|
||||||
get added. They may even be specified dynamically. It is not a good idea
|
|
||||||
for the HTMLPurifier_Config object to be used directly for such matters.
|
|
||||||
Instead, the userland code should explicitly perform the includes. We may
|
|
||||||
put in something like:
|
|
||||||
|
|
||||||
REQUIRES: HTMLPurifier_Filter_ExtractStyleBlocks
|
|
||||||
|
|
||||||
To indicate that if that class doesn't exist, and the user is attempting
|
|
||||||
to use the directive, we should fatally error out. The stub includes the core files,
|
|
||||||
and the user includes everything else. Any reflective things like new
|
|
||||||
$class would be required to tie in with the configuration.
|
|
||||||
|
|
||||||
It would work very well with rarely used configuration options, but it
|
|
||||||
wouldn't be so good for "core" parts that can be disabled. In such cases
|
|
||||||
the core include file would need to be modified, and the only way
|
|
||||||
to properly do this is use the configuration object. Once again, our
|
|
||||||
ability to create cache keys saves the day again: we can create arbitrary
|
|
||||||
stub files for arbitrary configurations and include those. They could
|
|
||||||
even be the single file affairs. The only thing we'd need to include,
|
|
||||||
then, would be HTMLPurifier_Config! Then, the configuration object would
|
|
||||||
load the library.
|
|
||||||
|
|
||||||
An aside...
|
|
||||||
-----------
|
|
||||||
One questions, however, the wisdom of letting PHP files write other PHP
|
|
||||||
files. It seems like a recipe for disaster, or at least lots of headaches
|
|
||||||
in highly secured setups, where PHP does not have the ability to write
|
|
||||||
to its root. In such cases, we could use sticky bits or tell the user
|
|
||||||
to manually generate the file.
|
|
||||||
|
|
||||||
The other troublesome bit is actually doing the calculations necessary.
|
|
||||||
For certain cases, it's simple (such as URIScheme), but for AttrDef
|
|
||||||
and HTMLModule the dependency trees are very complex in relation to
|
|
||||||
%HTML.Allowed and friends. I think that this idea should be shelved
|
|
||||||
and looked at a later, less insane date.
|
|
||||||
|
|
||||||
An interesting dilemma presents itself when a configuration form is offered
|
|
||||||
to the user. Normally, the configuration object is not accessible without
|
|
||||||
editing PHP code; this facility changes thing. The sensible thing to do
|
|
||||||
is stipulate that all classes required by the directives you allow must
|
|
||||||
be included.
|
|
||||||
|
|
||||||
Unit testing
|
|
||||||
------------
|
|
||||||
|
|
||||||
Setting up the parsing and translation into our existing format would not
|
|
||||||
be difficult to do. It might represent a good time for us to rethink our
|
|
||||||
tests for these facilities; as creative as they are, they are often hacky
|
|
||||||
and require public visibility for things that ought to be protected.
|
|
||||||
This is especially applicable for our DefinitionCache tests.
|
|
||||||
|
|
||||||
Migration
|
|
||||||
---------
|
|
||||||
|
|
||||||
Because we are not *adding* anything essentially new, it should be trivial
|
|
||||||
to write a script to take our existing data and dump it into the new format.
|
|
||||||
Well, not trivial, but fairly easy to accomplish. Primary implementation
|
|
||||||
difficulties would probably involve formatting the file nicely.
|
|
||||||
|
|
||||||
Backwards-compatibility
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
I expect that the ConfigSchema methods should stick around for a little bit,
|
|
||||||
but display E_USER_NOTICE warnings that they are deprecated. This will
|
|
||||||
require documentation!
|
|
||||||
|
|
||||||
New stuff
|
|
||||||
---------
|
|
||||||
|
|
||||||
VERSION: Version number directive was introduced
|
|
||||||
DEPRECATED-VERSION: If the directive was deprecated, when was it deprecated?
|
|
||||||
DEPRECATED-USE: If the directive was deprecated, what should the user use now?
|
|
||||||
REQUIRES: What classes does this configuration directive require, but are
|
|
||||||
not part of the HTML Purifier core?
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
83
vendor/ezyang/htmlpurifier/docs/dev-naming.html
vendored
|
@ -1,83 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<meta name="description" content="Defines class naming conventions in HTML Purifier." />
|
|
||||||
<link rel="stylesheet" type="text/css" href="./style.css" />
|
|
||||||
|
|
||||||
<title>Naming Conventions - HTML Purifier</title>
|
|
||||||
|
|
||||||
</head><body>
|
|
||||||
|
|
||||||
<h1>Naming Conventions</h1>
|
|
||||||
|
|
||||||
<div id="filing">Filed under Development</div>
|
|
||||||
<div id="index">Return to the <a href="index.html">index</a>.</div>
|
|
||||||
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>
|
|
||||||
|
|
||||||
<p>The classes in this library follow a few naming conventions, which may
|
|
||||||
help you find the correct functionality more quickly. Here they are:</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
<dt>All classes occupy the HTMLPurifier pseudo-namespace.</dt>
|
|
||||||
<dd>This means that all classes are prefixed with HTMLPurifier_. As such, all
|
|
||||||
names under HTMLPurifier_ are reserved. I recommend that you use the name
|
|
||||||
HTMLPurifierX_YourName_ClassName, especially if you want to take advantage
|
|
||||||
of HTMLPurifier_ConfigDef.</dd>
|
|
||||||
|
|
||||||
<dt>All classes correspond to their path if library/ was in the include path</dt>
|
|
||||||
<dd>HTMLPurifier_AttrDef is located at HTMLPurifier/AttrDef.php; replace
|
|
||||||
underscores with slashes and append .php and you'll have the location of
|
|
||||||
the class.</dd>
|
|
||||||
|
|
||||||
<dt>Harness and Test are reserved class names for unit tests</dt>
|
|
||||||
<dd>The suffix <code>Test</code> indicates that the class is a subclass of UnitTestCase
|
|
||||||
(of the Simpletest library) and is testable. "Harness" indicates a subclass
|
|
||||||
of UnitTestCase that is not meant to be run but to be extended into
|
|
||||||
concrete test cases and contains custom test methods (i.e. assert*())</dd>
|
|
||||||
|
|
||||||
<dt>Class names do not necessarily represent inheritance hierarchies</dt>
|
|
||||||
<dd>While we try to reflect inheritance in naming to some extent, it is not
|
|
||||||
guaranteed (for instance, none of the classes inherit from HTMLPurifier,
|
|
||||||
the base class). However, all class files have the require_once
|
|
||||||
declarations to whichever classes they are tightly coupled to.</dd>
|
|
||||||
|
|
||||||
<dt>Strategy has a meaning different from the Gang of Four pattern</dt>
|
|
||||||
<dd>In Design Patterns, the Gang of Four describes a Strategy object as
|
|
||||||
encapsulating an algorithm so that they can be switched at run-time. While
|
|
||||||
our strategies are indeed algorithms, they are not meant to be substituted:
|
|
||||||
all must be present in order for proper functioning.</dd>
|
|
||||||
|
|
||||||
<dt>Abbreviations are avoided</dt>
|
|
||||||
<dd>We try to avoid abbreviations as much as possible, but in some cases,
|
|
||||||
abbreviated version is more readable than the full version. Here, we
|
|
||||||
list common abbreviations:
|
|
||||||
<ul>
|
|
||||||
<li>Attr to Attributes (note that it is plural, i.e. <code>$attr = array()</code>)</li>
|
|
||||||
<li>Def to Definition</li>
|
|
||||||
<li><code>$ret</code> is the value to be returned in a function</li>
|
|
||||||
</ul>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt>Ambiguity concerning the definition of Def/Definition</dt>
|
|
||||||
<dd>While a definition normally defines the structure/acceptable values of
|
|
||||||
an entity, most of the definitions in this application also attempt
|
|
||||||
to validate and fix the value. I am unsure of a better name, as
|
|
||||||
"Validator" would exclude fixing the value, "Fixer" doesn't invoke
|
|
||||||
the proper image of "fixing" something, and "ValidatorFixer" is too long!
|
|
||||||
Some other suggestions were "Handler", "Reference", "Check", "Fix",
|
|
||||||
"Repair" and "Heal".</dd>
|
|
||||||
|
|
||||||
<dt>Transform not Transformer</dt>
|
|
||||||
<dd>Transform is both a noun and a verb, and thus we define a "Transform" as
|
|
||||||
something that "transforms," leaving "Transformer" (which sounds like an
|
|
||||||
electrical device/robot toy).</dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
</body></html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
|
@ -1,33 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<meta name="description" content="Discusses possible methods of optimizing HTML Purifier." />
|
|
||||||
<link rel="stylesheet" type="text/css" href="./style.css" />
|
|
||||||
|
|
||||||
<title>Optimization - HTML Purifier</title>
|
|
||||||
|
|
||||||
</head><body>
|
|
||||||
|
|
||||||
<h1>Optimization</h1>
|
|
||||||
|
|
||||||
<div id="filing">Filed under Development</div>
|
|
||||||
<div id="index">Return to the <a href="index.html">index</a>.</div>
|
|
||||||
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>
|
|
||||||
|
|
||||||
<p>Here are some possible optimization techniques we can apply to code sections if
|
|
||||||
they turn out to be slow. Be sure not to prematurely optimize: if you get
|
|
||||||
that itch, put it here!</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Make Tokens Flyweights (may prove problematic, probably not worth it)</li>
|
|
||||||
<li>Rewrite regexps into PHP code</li>
|
|
||||||
<li>Batch regexp validation (do as many per function call as possible)</li>
|
|
||||||
<li>Parallelize strategies</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</body></html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
309
vendor/ezyang/htmlpurifier/docs/dev-progress.html
vendored
|
@ -1,309 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<meta name="description" content="Tables detailing HTML element and CSS property implementation coverage in HTML Purifier." />
|
|
||||||
<link rel="stylesheet" type="text/css" href="./style.css" />
|
|
||||||
|
|
||||||
<title>Implementation Progress - HTML Purifier</title>
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
|
|
||||||
td {padding-right:1em;border-bottom:1px solid #000;padding-left:0.5em;}
|
|
||||||
th {text-align:left;padding-top:1.4em;font-size:13pt;
|
|
||||||
border-bottom:2px solid #000;background:#FFF;}
|
|
||||||
thead th {text-align:left;padding:0.1em;background-color:#EEE;}
|
|
||||||
|
|
||||||
.impl-yes {background:#9D9;}
|
|
||||||
.impl-partial {background:#FFA;}
|
|
||||||
.impl-no {background:#CCC;}
|
|
||||||
|
|
||||||
.danger {color:#600;}
|
|
||||||
.css1 {color:#060;}
|
|
||||||
.required {font-weight:bold;}
|
|
||||||
.feature {color:#999;}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</head><body>
|
|
||||||
|
|
||||||
<h1>Implementation Progress</h1>
|
|
||||||
|
|
||||||
<div id="filing">Filed under Development</div>
|
|
||||||
<div id="index">Return to the <a href="index.html">index</a>.</div>
|
|
||||||
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<strong>Warning:</strong> This table is kept for historical purposes and
|
|
||||||
is not being actively updated.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>Key</h2>
|
|
||||||
|
|
||||||
<table cellspacing="0"><tbody>
|
|
||||||
<tr><td class="impl-yes">Implemented</td></tr>
|
|
||||||
<tr><td class="impl-partial">Partially implemented</td></tr>
|
|
||||||
<tr><td class="impl-no">Not priority to implement</td></tr>
|
|
||||||
<tr><td class="danger">Dangerous attribute/property</td></tr>
|
|
||||||
<tr><td class="css1">Present in CSS1</td></tr>
|
|
||||||
<tr><td class="feature">Feature, requires extra work</td></tr>
|
|
||||||
</tbody></table>
|
|
||||||
|
|
||||||
<h2>CSS</h2>
|
|
||||||
|
|
||||||
<table cellspacing="0">
|
|
||||||
|
|
||||||
<thead>
|
|
||||||
<tr><th>Name</th><th>Notes</th></tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<tr><td>-</td><td>-</td></tr>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<tr><th colspan="2">Standard</th></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>background-color</td><td>COMPOSITE(<color>, transparent)</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>background</td><td>SHORTHAND, currently alias for background-color</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>border</td><td>SHORTHAND, MULTIPLE</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>border-color</td><td>MULTIPLE</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>border-style</td><td>MULTIPLE</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>border-width</td><td>MULTIPLE</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>border-*</td><td>SHORTHAND</td></tr>
|
|
||||||
<tr class="impl-yes"><td>border-*-color</td><td>COMPOSITE(<color>, transparent)</td></tr>
|
|
||||||
<tr class="impl-yes"><td>border-*-style</td><td>ENUM(none, hidden, dotted, dashed,
|
|
||||||
solid, double, groove, ridge, inset, outset)</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>border-*-width</td><td>COMPOSITE(<length>, thin, medium, thick)</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>clear</td><td>ENUM(none, left, right, both)</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>color</td><td><color></td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>float</td><td>ENUM(left, right, none), May require layout
|
|
||||||
precautions with clear</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>font</td><td>SHORTHAND</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>font-family</td><td>CSS validator may complain if fallback font
|
|
||||||
family not specified</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>font-size</td><td>COMPOSITE(<absolute-size>,
|
|
||||||
<relative-size>, <length>, <percentage>)</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>font-style</td><td>ENUM(normal, italic, oblique)</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>font-variant</td><td>ENUM(normal, small-caps)</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>font-weight</td><td>ENUM(normal, bold, bolder, lighter,
|
|
||||||
100, 200, 300, 400, 500, 600, 700, 800, 900), maybe special code for
|
|
||||||
in-between integers</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>letter-spacing</td><td>COMPOSITE(<length>, normal)</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>line-height</td><td>COMPOSITE(<number>,
|
|
||||||
<length>, <percentage>, normal)</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>list-style-position</td><td>ENUM(inside, outside),
|
|
||||||
Strange behavior in browsers</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>list-style-type</td><td>ENUM(...),
|
|
||||||
Well-supported values are: disc, circle, square,
|
|
||||||
decimal, lower-roman, upper-roman, lower-alpha and upper-alpha. See also
|
|
||||||
CSS 3. Mostly IE lack of support.</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>list-style</td><td>SHORTHAND</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>margin</td><td>MULTIPLE</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>margin-*</td><td>COMPOSITE(<length>,
|
|
||||||
<percentage>, auto)</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>padding</td><td>MULTIPLE</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>padding-*</td><td>COMPOSITE(<length>(positive),
|
|
||||||
<percentage>(positive))</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>text-align</td><td>ENUM(left, right,
|
|
||||||
center, justify)</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>text-decoration</td><td>No blink (argh my eyes), not
|
|
||||||
enum, can be combined (composite sorta): underline, overline,
|
|
||||||
line-through</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>text-indent</td><td>COMPOSITE(<length>,
|
|
||||||
<percentage>)</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>text-transform</td><td>ENUM(capitalize, uppercase,
|
|
||||||
lowercase, none)</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>width</td><td>COMPOSITE(<length>,
|
|
||||||
<percentage>, auto), Interesting</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>word-spacing</td><td>COMPOSITE(<length>, auto),
|
|
||||||
IE 5 no support</td></tr>
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<tr><th colspan="2">Table</th></tr>
|
|
||||||
<tr class="impl-yes"><td>border-collapse</td><td>ENUM(collapse, seperate)</td></tr>
|
|
||||||
<tr class="impl-yes"><td>border-space</td><td>MULTIPLE</td></tr>
|
|
||||||
<tr class="impl-yes"><td>caption-side</td><td>ENUM(top, bottom)</td></tr>
|
|
||||||
<tr class="feature"><td>empty-cells</td><td>ENUM(show, hide), No IE support makes this useless,
|
|
||||||
possible fix with &nbsp;? Unknown release milestone.</td></tr>
|
|
||||||
<tr class="impl-yes"><td>table-layout</td><td>ENUM(auto, fixed)</td></tr>
|
|
||||||
<tr class="impl-yes css1"><td>vertical-align</td><td>COMPOSITE(ENUM(baseline, sub,
|
|
||||||
super, top, text-top, middle, bottom, text-bottom), <percentage>,
|
|
||||||
<length>) Also applies to others with explicit height</td></tr>
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<tr><th colspan="2">Absolute positioning, unknown release milestone</th></tr>
|
|
||||||
<tr class="danger impl-no"><td>bottom</td><td rowspan="4">Dangerous, must be non-negative to even be considered,
|
|
||||||
but it's still possible to arbitrarily position by running over.</td></tr>
|
|
||||||
<tr class="danger impl-no"><td>left</td></tr>
|
|
||||||
<tr class="danger impl-no"><td>right</td></tr>
|
|
||||||
<tr class="danger impl-no"><td>top</td></tr>
|
|
||||||
<tr class="impl-no"><td>clip</td><td>-</td></tr>
|
|
||||||
<tr class="danger impl-no"><td>position</td><td>ENUM(static, relative, absolute, fixed)
|
|
||||||
relative not absolute?</td></tr>
|
|
||||||
<tr class="danger impl-no"><td>z-index</td><td>Dangerous</td></tr>
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<tr><th colspan="2">Unknown</th></tr>
|
|
||||||
<tr class="danger css1 impl-yes"><td>background-image</td><td>Dangerous</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>background-attachment</td><td>ENUM(scroll, fixed),
|
|
||||||
Depends on background-image</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>background-position</td><td>Depends on background-image</td></tr>
|
|
||||||
<tr class="danger impl-no"><td>cursor</td><td>Dangerous but fluffy</td></tr>
|
|
||||||
<tr class="danger impl-yes"><td>display</td><td>ENUM(...), Dangerous but interesting;
|
|
||||||
will not implement list-item, run-in (Opera only) or table (no IE);
|
|
||||||
inline-block has incomplete IE6 support and requires -moz-inline-box
|
|
||||||
for Mozilla. Unknown target milestone.</td></tr>
|
|
||||||
<tr class="css1 impl-yes"><td>height</td><td>Interesting, why use it? Unknown target milestone.</td></tr>
|
|
||||||
<tr class="danger css1 impl-yes"><td>list-style-image</td><td>Dangerous?</td></tr>
|
|
||||||
<tr class="impl-no"><td>max-height</td><td rowspan="4">No IE 5/6</td></tr>
|
|
||||||
<tr class="impl-no"><td>min-height</td></tr>
|
|
||||||
<tr class="impl-no"><td>max-width</td></tr>
|
|
||||||
<tr class="impl-no"><td>min-width</td></tr>
|
|
||||||
<tr class="impl-no"><td>orphans</td><td>No IE support</td></tr>
|
|
||||||
<tr class="impl-no"><td>widows</td><td>No IE support</td></tr>
|
|
||||||
<tr><td>overflow</td><td>ENUM, IE 5/6 almost (remove visible if set). Unknown target milestone.</td></tr>
|
|
||||||
<tr><td>page-break-after</td><td>ENUM(auto, always, avoid, left, right),
|
|
||||||
IE 5.5/6 and Opera. Unknown target milestone.</td></tr>
|
|
||||||
<tr><td>page-break-before</td><td>ENUM(auto, always, avoid, left, right),
|
|
||||||
Mostly supported. Unknown target milestone.</td></tr>
|
|
||||||
<tr><td>page-break-inside</td><td>ENUM(avoid, auto), Opera only. Unknown target milestone.</td></tr>
|
|
||||||
<tr class="impl-no"><td>quotes</td><td>May be dropped from CSS2, fairly useless for inline context</td></tr>
|
|
||||||
<tr class="danger impl-yes"><td>visibility</td><td>ENUM(visible, hidden, collapse),
|
|
||||||
Dangerous</td></tr>
|
|
||||||
<tr class="css1 feature impl-partial"><td>white-space</td><td>ENUM(normal, pre, nowrap, pre-wrap,
|
|
||||||
pre-line), Spotty implementation:
|
|
||||||
pre (no IE 5/6), <em>nowrap</em> (no IE 5, supported),
|
|
||||||
pre-wrap (only Opera), pre-line (no support). Fixable? Unknown target milestone.</td></tr>
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
<tbody class="impl-no">
|
|
||||||
<tr><th colspan="2">Aural</th></tr>
|
|
||||||
<tr><td>azimuth</td><td>-</td></tr>
|
|
||||||
<tr><td>cue</td><td>-</td></tr>
|
|
||||||
<tr><td>cue-after</td><td>-</td></tr>
|
|
||||||
<tr><td>cue-before</td><td>-</td></tr>
|
|
||||||
<tr><td>elevation</td><td>-</td></tr>
|
|
||||||
<tr><td>pause-after</td><td>-</td></tr>
|
|
||||||
<tr><td>pause-before</td><td>-</td></tr>
|
|
||||||
<tr><td>pause</td><td>-</td></tr>
|
|
||||||
<tr><td>pitch-range</td><td>-</td></tr>
|
|
||||||
<tr><td>pitch</td><td>-</td></tr>
|
|
||||||
<tr><td>play-during</td><td>-</td></tr>
|
|
||||||
<tr><td>richness</td><td>-</td></tr>
|
|
||||||
<tr><td>speak-header</td><td>Table related</td></tr>
|
|
||||||
<tr><td>speak-numeral</td><td>-</td></tr>
|
|
||||||
<tr><td>speak-punctuation</td><td>-</td></tr>
|
|
||||||
<tr><td>speak</td><td>-</td></tr>
|
|
||||||
<tr><td>speech-rate</td><td>-</td></tr>
|
|
||||||
<tr><td>stress</td><td>-</td></tr>
|
|
||||||
<tr><td>voice-family</td><td>-</td></tr>
|
|
||||||
<tr><td>volume</td><td>-</td></tr>
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
<tbody class="impl-no">
|
|
||||||
<tr><th colspan="2">Will not implement</th></tr>
|
|
||||||
<tr><td>content</td><td>Not applicable for inline styles</td></tr>
|
|
||||||
<tr><td>counter-increment</td><td>Needs content, Opera only</td></tr>
|
|
||||||
<tr><td>counter-reset</td><td>Needs content, Opera only</td></tr>
|
|
||||||
<tr><td>direction</td><td>No support</td></tr>
|
|
||||||
<tr><td>outline-color</td><td rowspan="4">IE Mac and Opera on outside,
|
|
||||||
Mozilla on inside and needs -moz-outline, no IE support.</td></tr>
|
|
||||||
<tr><td>outline-style</td></tr>
|
|
||||||
<tr><td>outline-width</td></tr>
|
|
||||||
<tr><td>outline</td></tr>
|
|
||||||
<tr><td>unicode-bidi</td><td>No support</td></tr>
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<h2>Interesting Attributes</h2>
|
|
||||||
|
|
||||||
<table cellspacing="0">
|
|
||||||
|
|
||||||
<thead>
|
|
||||||
<tr><th>Attribute</th><th>Tags</th><th>Notes</th></tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<tr><th></th></tr>
|
|
||||||
<tbody>
|
|
||||||
<tr><td>-</td><td>-</td><td>-</td></tr>
|
|
||||||
</tbody>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<tr><th colspan="3">CSS</th></tr>
|
|
||||||
<tr class="impl-yes"><td>style</td><td>All</td><td>Parser is reasonably functional. Status here doesn't count individual properties.</td></tr>
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<tr><th colspan="3">Questionable</th></tr>
|
|
||||||
<tr class="impl-no"><td>accesskey</td><td>A</td><td>May interfere with main interface</td></tr>
|
|
||||||
<tr class="impl-no"><td>tabindex</td><td>A</td><td>May interfere with main interface</td></tr>
|
|
||||||
<tr class="impl-yes"><td>target</td><td>A</td><td>Config enabled, only useful for frame layouts, disallowed in strict</td></tr>
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<tr><th colspan="3">Miscellaneous</th></tr>
|
|
||||||
<tr><td>datetime</td><td>DEL, INS</td><td>No visible effect, ISO format</td></tr>
|
|
||||||
<tr class="impl-yes"><td>rel</td><td>A</td><td>Largely user-defined: nofollow, tag (see microformats)</td></tr>
|
|
||||||
<tr class="impl-yes"><td>rev</td><td>A</td><td>Largely user-defined: vote-*</td></tr>
|
|
||||||
<tr class="feature"><td>axis</td><td>TD, TH</td><td>W3C only: No browser implementation</td></tr>
|
|
||||||
<tr class="feature"><td>char</td><td>COL, COLGROUP, TBODY, TD, TFOOT, TH, THEAD, TR</td><td>W3C only: No browser implementation</td></tr>
|
|
||||||
<tr class="feature"><td>headers</td><td>TD, TH</td><td>W3C only: No browser implementation</td></tr>
|
|
||||||
<tr class="impl-yes"><td>scope</td><td>TD, TH</td><td>W3C only: No browser implementation</td></tr>
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
<tbody class="impl-yes">
|
|
||||||
<tr><th colspan="3">URI</th></tr>
|
|
||||||
<tr><td rowspan="2">cite</td><td>BLOCKQUOTE, Q</td><td>For attribution</td></tr>
|
|
||||||
<tr><td>DEL, INS</td><td>Link to explanation why it changed</td></tr>
|
|
||||||
<tr><td>href</td><td>A</td><td>-</td></tr>
|
|
||||||
<tr><td>longdesc</td><td>IMG</td><td>-</td></tr>
|
|
||||||
<tr class="required"><td>src</td><td>IMG</td><td>Required</td></tr>
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<tr><th colspan="3">Transform</th></tr>
|
|
||||||
<tr class="impl-yes"><td rowspan="5">align</td><td>CAPTION</td><td>'caption-side' for top/bottom, 'text-align' for left/right</td></tr>
|
|
||||||
<tr class="impl-yes"><td>IMG</td><td rowspan="3">See specimens/html-align-to-css.html</td></tr>
|
|
||||||
<tr class="impl-yes"><td>TABLE</td></tr>
|
|
||||||
<tr class="impl-yes"><td>HR</td></tr>
|
|
||||||
<tr class="impl-yes"><td>H1, H2, H3, H4, H5, H6, P</td><td>Equivalent style 'text-align'</td></tr>
|
|
||||||
<tr class="required impl-yes"><td>alt</td><td>IMG</td><td>Required, insert image filename if src is present or default invalid image text</td></tr>
|
|
||||||
<tr class="impl-yes"><td rowspan="3">bgcolor</td><td>TABLE</td><td>Superset style 'background-color'</td></tr>
|
|
||||||
<tr class="impl-yes"><td>TR</td><td>Superset style 'background-color'</td></tr>
|
|
||||||
<tr class="impl-yes"><td>TD, TH</td><td>Superset style 'background-color'</td></tr>
|
|
||||||
<tr class="impl-yes"><td>border</td><td>IMG</td><td>Equivalent style <code>border:[number]px solid</code></td></tr>
|
|
||||||
<tr class="impl-yes"><td>clear</td><td>BR</td><td>Near-equiv style 'clear', transform 'all' into 'both'</td></tr>
|
|
||||||
<tr class="impl-no"><td>compact</td><td>DL, OL, UL</td><td>Boolean, needs custom CSS class; rarely used anyway</td></tr>
|
|
||||||
<tr class="required impl-yes"><td>dir</td><td>BDO</td><td>Required, insert ltr (or configuration value) if none</td></tr>
|
|
||||||
<tr class="impl-yes"><td>height</td><td>TD, TH</td><td>Near-equiv style 'height', needs px suffix if original was in pixels</td></tr>
|
|
||||||
<tr class="impl-yes"><td>hspace</td><td>IMG</td><td>Near-equiv styles 'margin-top' and 'margin-bottom', needs px suffix</td></tr>
|
|
||||||
<tr class="impl-yes"><td>lang</td><td>*</td><td>Copy value to xml:lang</td></tr>
|
|
||||||
<tr class="impl-yes"><td rowspan="2">name</td><td>IMG</td><td>Turn into ID</td></tr>
|
|
||||||
<tr class="impl-yes"><td>A</td><td>Turn into ID</td></tr>
|
|
||||||
<tr class="impl-yes"><td>noshade</td><td>HR</td><td>Boolean, style 'border-style:solid;'</td></tr>
|
|
||||||
<tr class="impl-yes"><td>nowrap</td><td>TD, TH</td><td>Boolean, style 'white-space:nowrap;' (not compat with IE5)</td></tr>
|
|
||||||
<tr class="impl-yes"><td>size</td><td>HR</td><td>Near-equiv 'height', needs px suffix if original was pixels</td></tr>
|
|
||||||
<tr class="required impl-yes"><td>src</td><td>IMG</td><td>Required, insert blank or default img if not set</td></tr>
|
|
||||||
<tr class="impl-yes"><td>start</td><td>OL</td><td>Poorly supported 'counter-reset', allowed in loose, dropped in strict</td></tr>
|
|
||||||
<tr class="impl-yes"><td rowspan="3">type</td><td>LI</td><td rowspan="3">Equivalent style 'list-style-type', different allowed values though. (needs testing)</td></tr>
|
|
||||||
<tr class="impl-yes"><td>OL</td></tr>
|
|
||||||
<tr class="impl-yes"><td>UL</td></tr>
|
|
||||||
<tr class="impl-yes"><td>value</td><td>LI</td><td>Poorly supported 'counter-reset', allowed in loose, dropped in strict</td></tr>
|
|
||||||
<tr class="impl-yes"><td>vspace</td><td>IMG</td><td>Near-equiv styles 'margin-left' and 'margin-right', needs px suffix, see hspace</td></tr>
|
|
||||||
<tr class="impl-yes"><td rowspan="2">width</td><td>HR</td><td rowspan="2">Near-equiv style 'width', needs px suffix if original was pixels</td></tr>
|
|
||||||
<tr class="impl-yes"><td>TD, TH</td></tr>
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</body></html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
|
@ -1,850 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<meta name="description" content="Tutorial for customizing HTML Purifier's tag and attribute sets." />
|
|
||||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
|
||||||
|
|
||||||
<title>Customize - HTML Purifier</title>
|
|
||||||
|
|
||||||
</head><body>
|
|
||||||
|
|
||||||
<h1 class="subtitled">Customize!</h1>
|
|
||||||
<div class="subtitle">HTML Purifier is a Swiss-Army Knife</div>
|
|
||||||
|
|
||||||
<div id="filing">Filed under End-User</div>
|
|
||||||
<div id="index">Return to the <a href="index.html">index</a>.</div>
|
|
||||||
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
HTML Purifier has this quirk where if you try to allow certain elements or
|
|
||||||
attributes, HTML Purifier will tell you that it's not supported, and that
|
|
||||||
you should go to the forums to find out how to implement it. Well, this
|
|
||||||
document is how to implement elements and attributes which HTML Purifier
|
|
||||||
doesn't support out of the box.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>Is it necessary?</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Before we even write any code, it is paramount to consider whether or
|
|
||||||
not the code we're writing is necessary or not. HTML Purifier, by default,
|
|
||||||
contains a large set of elements and attributes: large enough so that
|
|
||||||
<em>any</em> element or attribute in XHTML 1.0 or 1.1 (and its HTML variants)
|
|
||||||
that can be safely used by the general public is implemented.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
So what needs to be implemented? (Feel free to skip this section if
|
|
||||||
you know what you want).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>XHTML 1.0</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
All of the modules listed below are based off of the
|
|
||||||
<a href="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#sec_5.2.">modularization of
|
|
||||||
XHTML</a>, which, while technically for XHTML 1.1, is quite a useful
|
|
||||||
resource.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Structure</li>
|
|
||||||
<li>Frames</li>
|
|
||||||
<li>Applets (deprecated)</li>
|
|
||||||
<li>Forms</li>
|
|
||||||
<li>Image maps</li>
|
|
||||||
<li>Objects</li>
|
|
||||||
<li>Frames</li>
|
|
||||||
<li>Events</li>
|
|
||||||
<li>Meta-information</li>
|
|
||||||
<li>Style sheets</li>
|
|
||||||
<li>Link (not hypertext)</li>
|
|
||||||
<li>Base</li>
|
|
||||||
<li>Name</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
If you don't recognize it, you probably don't need it. But the curious
|
|
||||||
can look all of these modules up in the above-mentioned document. Note
|
|
||||||
that inline scripting comes packaged with HTML Purifier (more on this
|
|
||||||
later).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>XHTML 1.1</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
As of HTMLPurifier 2.1.0, we have implemented the
|
|
||||||
<a href="http://www.w3.org/TR/2001/REC-ruby-20010531/">Ruby module</a>,
|
|
||||||
which defines a set of tags
|
|
||||||
for publishing short annotations for text, used mostly in Japanese
|
|
||||||
and Chinese school texts, but applicable for positioning any text (not
|
|
||||||
limited to translations) above or below other corresponding text.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>HTML 5</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<a href="http://www.whatwg.org/specs/web-apps/current-work/">HTML 5</a>
|
|
||||||
is a fork of HTML 4.01 by WHATWG, who believed that XHTML 2.0 was headed
|
|
||||||
in the wrong direction. It too is a working draft, and may change
|
|
||||||
drastically before publication, but it should be noted that the
|
|
||||||
<code>canvas</code> tag has been implemented by many browser vendors.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>Proprietary</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
There are a number of proprietary tags still in the wild. Many of them
|
|
||||||
have been documented in <a href="ref-proprietary-tags.txt">ref-proprietary-tags.txt</a>,
|
|
||||||
but there is currently no implementation for any of them.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>Extensions</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
There are also a number of other XML languages out there that can
|
|
||||||
be embedded in HTML documents: two of the most popular are MathML and
|
|
||||||
SVG, and I frequently get requests to implement these. But they are
|
|
||||||
expansive, comprehensive specifications, and it would take far too long
|
|
||||||
to implement them <em>correctly</em> (most systems I've seen go as far
|
|
||||||
as whitelisting tags and no further; come on, what about nesting!)
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Word of warning: HTML Purifier is currently <em>not</em> namespace
|
|
||||||
aware.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>Giving back</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
As you may imagine from the details above (don't be abashed if you didn't
|
|
||||||
read it all: a glance over would have done), there's quite a bit that
|
|
||||||
HTML Purifier doesn't implement. Recent architectural changes have
|
|
||||||
allowed HTML Purifier to implement elements and attributes that are not
|
|
||||||
safe! Don't worry, they won't be activated unless you set %HTML.Trusted
|
|
||||||
to true, but they certainly help out users who need to put, say, forms
|
|
||||||
on their page and don't want to go through the trouble of reading this
|
|
||||||
and implementing it themself.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
So any of the above that you implement for your own application could
|
|
||||||
help out some other poor sap on the other side of the globe. Help us
|
|
||||||
out, and send back code so that it can be hammered into a module and
|
|
||||||
released with the core. Any code would be greatly appreciated!
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>And now...</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Enough philosophical talk, time for some code:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>$config = HTMLPurifier_Config::createDefault();
|
|
||||||
$config->set('HTML.DefinitionID', 'enduser-customize.html tutorial');
|
|
||||||
$config->set('HTML.DefinitionRev', 1);
|
|
||||||
if ($def = $config->maybeGetRawHTMLDefinition()) {
|
|
||||||
// our code will go here
|
|
||||||
}</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Assuming that HTML Purifier has already been properly loaded (hint:
|
|
||||||
include <code>HTMLPurifier.auto.php</code>), this code will set up
|
|
||||||
the environment that you need to start customizing the HTML definition.
|
|
||||||
What's going on?
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
The first three lines are regular configuration code:
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
%HTML.DefinitionID is set to a unique identifier for your
|
|
||||||
custom HTML definition. This prevents it from clobbering
|
|
||||||
other custom definitions on the same installation.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
%HTML.DefinitionRev is a revision integer of your HTML
|
|
||||||
definition. Because HTML definitions are cached, you'll need
|
|
||||||
to increment this whenever you make a change in order to flush
|
|
||||||
the cache.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
The fourth line retrieves a raw <code>HTMLPurifier_HTMLDefinition</code>
|
|
||||||
object that we will be tweaking. Interestingly enough, we have
|
|
||||||
placed it in an if block: this is because
|
|
||||||
<code>maybeGetRawHTMLDefinition</code>, as its name suggests, may
|
|
||||||
return a NULL, in which case we should skip doing any
|
|
||||||
initialization. This, in fact, will correspond to when our fully
|
|
||||||
customized object is already in the cache.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2>Turn off caching</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To make development easier, we're going to temporarily turn off
|
|
||||||
definition caching:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>$config = HTMLPurifier_Config::createDefault();
|
|
||||||
$config->set('HTML.DefinitionID', 'enduser-customize.html tutorial');
|
|
||||||
$config->set('HTML.DefinitionRev', 1);
|
|
||||||
<strong>$config->set('Cache.DefinitionImpl', null); // TODO: remove this later!</strong>
|
|
||||||
$def = $config->getHTMLDefinition(true);</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
A few things should be mentioned about the caching mechanism before
|
|
||||||
we move on. For performance reasons, HTML Purifier caches generated
|
|
||||||
<code>HTMLPurifier_Definition</code> objects in serialized files
|
|
||||||
stored (by default) in <code>library/HTMLPurifier/DefinitionCache/Serializer</code>.
|
|
||||||
A lot of processing is done in order to create these objects, so it
|
|
||||||
makes little sense to repeat the same processing over and over again
|
|
||||||
whenever HTML Purifier is called.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
In order to identify a cache entry, HTML Purifier uses three variables:
|
|
||||||
the library's version number, the value of %HTML.DefinitionRev and
|
|
||||||
a serial of relevant configuration. Whenever any of these changes,
|
|
||||||
a new HTML definition is generated. Notice that there is no way
|
|
||||||
for the definition object to track changes to customizations: here, it
|
|
||||||
is up to you to supply appropriate information to DefinitionID and
|
|
||||||
DefinitionRev.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="addAttribute">Add an attribute</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For this example, we're going to implement the <code>target</code> attribute found
|
|
||||||
on <code>a</code> elements. To implement an attribute, we have to
|
|
||||||
ask a few questions:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>What element is it found on?</li>
|
|
||||||
<li>What is its name?</li>
|
|
||||||
<li>Is it required or optional?</li>
|
|
||||||
<li>What are valid values for it?</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The first three are easy: the element is <code>a</code>, the attribute
|
|
||||||
is <code>target</code>, and it is not a required attribute. (If it
|
|
||||||
was required, we'd need to append an asterisk to the attribute name,
|
|
||||||
you'll see an example of this in the addElement() example).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The last question is a little trickier.
|
|
||||||
Lets allow the special values: _blank, _self, _target and _top.
|
|
||||||
The form of this is called an <strong>enumeration</strong>, a list of
|
|
||||||
valid values, although only one can be used at a time. To translate
|
|
||||||
this into code form, we write:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>$config = HTMLPurifier_Config::createDefault();
|
|
||||||
$config->set('HTML.DefinitionID', 'enduser-customize.html tutorial');
|
|
||||||
$config->set('HTML.DefinitionRev', 1);
|
|
||||||
$config->set('Cache.DefinitionImpl', null); // remove this later!
|
|
||||||
$def = $config->getHTMLDefinition(true);
|
|
||||||
<strong>$def->addAttribute('a', 'target', 'Enum#_blank,_self,_target,_top');</strong></pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The <code>Enum#_blank,_self,_target,_top</code> does all the magic.
|
|
||||||
The string is split into two parts, separated by a hash mark (#):
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>The first part is the name of what we call an <code>AttrDef</code></li>
|
|
||||||
<li>The second part is the parameter of the above-mentioned <code>AttrDef</code></li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
If that sounds vague and generic, it's because it is! HTML Purifier defines
|
|
||||||
an assortment of different attribute types one can use, and each of these
|
|
||||||
has their own specialized parameter format. Here are some of the more useful
|
|
||||||
ones:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Type</th>
|
|
||||||
<th>Format</th>
|
|
||||||
<th>Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>Enum</th>
|
|
||||||
<td><em>[s:]</em>value1,value2,...</td>
|
|
||||||
<td>
|
|
||||||
Attribute with a number of valid values, one of which may be used. When
|
|
||||||
s: is present, the enumeration is case sensitive.
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Bool</th>
|
|
||||||
<td>attribute_name</td>
|
|
||||||
<td>
|
|
||||||
Boolean attribute, with only one valid value: the name
|
|
||||||
of the attribute.
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>CDATA</th>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
Attribute of arbitrary text. Can also be referred to as <strong>Text</strong>
|
|
||||||
(the specification makes a semantic distinction between the two).
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>ID</th>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
Attribute that specifies a unique ID
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Pixels</th>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
Attribute that specifies an integer pixel length
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Length</th>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
Attribute that specifies a pixel or percentage length
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>NMTOKENS</th>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
Attribute that specifies a number of name tokens, example: the
|
|
||||||
<code>class</code> attribute
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>URI</th>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
Attribute that specifies a URI, example: the <code>href</code>
|
|
||||||
attribute
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Number</th>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
Attribute that specifies an positive integer number
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For a complete list, consult
|
|
||||||
<a href="http://repo.or.cz/w/htmlpurifier.git?a=blob;hb=HEAD;f=library/HTMLPurifier/AttrTypes.php"><code>library/HTMLPurifier/AttrTypes.php</code></a>;
|
|
||||||
more information on attributes that accept parameters can be found on their
|
|
||||||
respective includes in
|
|
||||||
<a href="http://repo.or.cz/w/htmlpurifier.git?a=tree;hb=HEAD;f=library/HTMLPurifier/AttrDef"><code>library/HTMLPurifier/AttrDef</code></a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Sometimes, the restrictive list in AttrTypes just doesn't cut it. Don't
|
|
||||||
sweat: you can also use a fully instantiated object as the value. The
|
|
||||||
equivalent, verbose form of the above example is:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>$config = HTMLPurifier_Config::createDefault();
|
|
||||||
$config->set('HTML.DefinitionID', 'enduser-customize.html tutorial');
|
|
||||||
$config->set('HTML.DefinitionRev', 1);
|
|
||||||
$config->set('Cache.DefinitionImpl', null); // remove this later!
|
|
||||||
$def = $config->getHTMLDefinition(true);
|
|
||||||
<strong>$def->addAttribute('a', 'target', new HTMLPurifier_AttrDef_Enum(
|
|
||||||
array('_blank','_self','_target','_top')
|
|
||||||
));</strong></pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Trust me, you'll learn to love the shorthand.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>Add an element</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Adding attributes is really small-fry stuff, though, and it was possible
|
|
||||||
to add them (albeit a bit more wordy) prior to 2.0. The real gem of
|
|
||||||
the Advanced API is adding elements. There are five questions to
|
|
||||||
ask when adding a new element:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>What is the element's name?</li>
|
|
||||||
<li>What content set does this element belong to?</li>
|
|
||||||
<li>What are the allowed children of this element?</li>
|
|
||||||
<li>What attributes does the element allow that are general?</li>
|
|
||||||
<li>What attributes does the element allow that are specific to this element?</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
It's a mouthful, and you'll be slightly lost if your not familiar with
|
|
||||||
the HTML specification, so let's explain them step by step.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>Content set</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The HTML specification defines two major content sets: Inline
|
|
||||||
and Block. Each of these
|
|
||||||
content sets contain a list of elements: Inline contains things like
|
|
||||||
<code>span</code> and <code>b</code> while Block contains things like
|
|
||||||
<code>div</code> and <code>blockquote</code>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
These content sets amount to a macro mechanism for HTML definition. Most
|
|
||||||
elements in HTML are organized into one of these two sets, and most
|
|
||||||
elements in HTML allow elements from one of these sets. If we had
|
|
||||||
to write each element verbatim into each other element's allowed
|
|
||||||
children, we would have ridiculously large lists; instead we use
|
|
||||||
content sets to compactify the declaration.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Practically speaking, there are several useful values you can use here:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Content set</th>
|
|
||||||
<th>Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>Inline</th>
|
|
||||||
<td>Character level elements, text</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Block</th>
|
|
||||||
<td>Block-like elements, like paragraphs and lists</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th><em>false</em></th>
|
|
||||||
<td>
|
|
||||||
Any element that doesn't fit into the mold, for example <code>li</code>
|
|
||||||
or <code>tr</code>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
By specifying a valid value here, all other elements that use that
|
|
||||||
content set will also allow your element, without you having to do
|
|
||||||
anything. If you specify <em>false</em>, you'll have to register
|
|
||||||
your element manually.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>Allowed children</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Allowed children defines the elements that this element can contain.
|
|
||||||
The allowed values may range from none to a complex regexp depending on
|
|
||||||
your element.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
If you've ever taken a look at the HTML DTD's before, you may have
|
|
||||||
noticed declarations like this:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre><!ELEMENT LI - O (%flow;)* -- list item --></pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The <code>(%flow;)*</code> indicates the allowed children of the
|
|
||||||
<code>li</code> tag: <code>li</code> allows any number of flow
|
|
||||||
elements as its children. (The <code>- O</code> allows the closing tag to be
|
|
||||||
omitted, though in XML this is not allowed.) In HTML Purifier,
|
|
||||||
we'd write it like <code>Flow</code> (here's where the content sets
|
|
||||||
we were discussing earlier come into play). There are three shorthand
|
|
||||||
content models you can specify:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Content model</th>
|
|
||||||
<th>Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>Empty</th>
|
|
||||||
<td>No children allowed, like <code>br</code> or <code>hr</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Inline</th>
|
|
||||||
<td>Any number of inline elements and text, like <code>span</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Flow</th>
|
|
||||||
<td>Any number of inline elements, block elements and text, like <code>div</code></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This covers 90% of all the cases out there, but what about elements that
|
|
||||||
break the mold like <code>ul</code>? This guy requires at least one
|
|
||||||
child, and the only valid children for it are <code>li</code>. The
|
|
||||||
content model is: <code>Required: li</code>. There are two parts: the
|
|
||||||
first type determines what <code>ChildDef</code> will be used to validate
|
|
||||||
content models. The most common values are:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Type</th>
|
|
||||||
<th>Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>Required</th>
|
|
||||||
<td>Children must be one or more of the valid elements</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Optional</th>
|
|
||||||
<td>Children can be any number of the valid elements</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Custom</th>
|
|
||||||
<td>Children must follow the DTD-style regex</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can also implement your own <code>ChildDef</code>: this was done
|
|
||||||
for a few special cases in HTML Purifier such as <code>Chameleon</code>
|
|
||||||
(for <code>ins</code> and <code>del</code>), <code>StrictBlockquote</code>
|
|
||||||
and <code>Table</code>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The second part specifies either valid elements or a regular expression.
|
|
||||||
Valid elements are separated with horizontal bars (|), i.e.
|
|
||||||
"<code>a | b | c</code>". Use #PCDATA to represent plain text.
|
|
||||||
Regular expressions are based off of DTD's style:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Parentheses () are used for grouping</li>
|
|
||||||
<li>Commas (,) separate elements that should come one after another</li>
|
|
||||||
<li>Horizontal bars (|) indicate one or the other elements should be used</li>
|
|
||||||
<li>Plus signs (+) are used for a one or more match</li>
|
|
||||||
<li>Asterisks (*) are used for a zero or more match</li>
|
|
||||||
<li>Question marks (?) are used for a zero or one match</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For example, "<code>a, b?, (c | d), e+, f*</code>" means "In this order,
|
|
||||||
one <code>a</code> element, at most one <code>b</code> element,
|
|
||||||
one <code>c</code> or <code>d</code> element (but not both), one or more
|
|
||||||
<code>e</code> elements, and any number of <code>f</code> elements."
|
|
||||||
Regex veterans should be able to jump right in, and those not so savvy
|
|
||||||
can always copy-paste W3C's content model definitions into HTML Purifier
|
|
||||||
and hope for the best.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
A word of warning: while the regex format is extremely flexible on
|
|
||||||
the developer's side, it is
|
|
||||||
quite unforgiving on the user's side. If the user input does not <em>exactly</em>
|
|
||||||
match the specification, the entire contents of the element will
|
|
||||||
be nuked. This is why there is are specific content model types like
|
|
||||||
Optional and Required: while they could be implemented as <code>Custom:
|
|
||||||
(valid | elements)*</code>, the custom classes contain special recovery
|
|
||||||
measures that make sure as much of the user's original content gets
|
|
||||||
through. HTML Purifier's core, as a rule, does not use Custom.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
One final note: you can also use Content Sets inside your valid elements
|
|
||||||
lists or regular expressions. In fact, the three shorthand content models
|
|
||||||
mentioned above are just that: abbreviations:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Content model</th>
|
|
||||||
<th>Implementation</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>Inline</th>
|
|
||||||
<td>Optional: Inline | #PCDATA</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Flow</th>
|
|
||||||
<td>Optional: Flow | #PCDATA</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When the definition is compiled, Inline will be replaced with a
|
|
||||||
horizontal-bar separated list of inline elements. Also, notice that
|
|
||||||
it does not contain text: you have to specify that yourself.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>Common attributes</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Congratulations: you have just gotten over the proverbial hump (Allowed
|
|
||||||
children). Common attributes is much simpler, and boils down to
|
|
||||||
one question: does your element have the <code>id</code>, <code>style</code>,
|
|
||||||
<code>class</code>, <code>title</code> and <code>lang</code> attributes?
|
|
||||||
If so, you'll want to specify the <code>Common</code> attribute collection,
|
|
||||||
which contains these five attributes that are found on almost every
|
|
||||||
HTML element in the specification.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
There are a few more collections, but they're really edge cases:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Collection</th>
|
|
||||||
<th>Attributes</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>I18N</th>
|
|
||||||
<td><code>lang</code>, possibly <code>xml:lang</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Core</th>
|
|
||||||
<td><code>style</code>, <code>class</code>, <code>id</code> and <code>title</code></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Common is a combination of the above-mentioned collections.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p class="aside">
|
|
||||||
Readers familiar with the modularization may have noticed that the Core
|
|
||||||
attribute collection differs from that specified by the <a
|
|
||||||
href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_commonatts">abstract
|
|
||||||
modules of the XHTML Modularization 1.1</a>. We believe this section
|
|
||||||
to be in error, as <code>br</code> permits the use of the <code>style</code>
|
|
||||||
attribute even though it uses the <code>Core</code> collection, and
|
|
||||||
the DTD and XML Schemas supplied by W3C support our interpretation.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>Attributes</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
If you didn't read the <a href="#addAttribute">earlier section on
|
|
||||||
adding attributes</a>, read it now. The last parameter is simply
|
|
||||||
an array of attribute names to attribute implementations, in the exact
|
|
||||||
same format as <code>addAttribute()</code>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>Putting it all together</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
We're going to implement <code>form</code>. Before we embark, lets
|
|
||||||
grab a reference implementation from over at the
|
|
||||||
<a href="http://www.w3.org/TR/html4/sgml/loosedtd.html">transitional DTD</a>:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre><!ELEMENT FORM - - (%flow;)* -(FORM) -- interactive form -->
|
|
||||||
<!ATTLIST FORM
|
|
||||||
%attrs; -- %coreattrs, %i18n, %events --
|
|
||||||
action %URI; #REQUIRED -- server-side form handler --
|
|
||||||
method (GET|POST) GET -- HTTP method used to submit the form--
|
|
||||||
enctype %ContentType; "application/x-www-form-urlencoded"
|
|
||||||
accept %ContentTypes; #IMPLIED -- list of MIME types for file upload --
|
|
||||||
name CDATA #IMPLIED -- name of form for scripting --
|
|
||||||
onsubmit %Script; #IMPLIED -- the form was submitted --
|
|
||||||
onreset %Script; #IMPLIED -- the form was reset --
|
|
||||||
target %FrameTarget; #IMPLIED -- render in this frame --
|
|
||||||
accept-charset %Charsets; #IMPLIED -- list of supported charsets --
|
|
||||||
></pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Juicy! With just this, we can answer four of our five questions:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>What is the element's name? <strong>form</strong></li>
|
|
||||||
<li>What content set does this element belong to? <strong>Block</strong>
|
|
||||||
(this needs a little sleuthing, I find the easiest way is to search
|
|
||||||
the DTD for <code>FORM</code> and determine which set it is in.)</li>
|
|
||||||
<li>What are the allowed children of this element? <strong>One
|
|
||||||
or more flow elements, but no nested <code>form</code>s</strong></li>
|
|
||||||
<li>What attributes does the element allow that are general? <strong>Common</strong></li>
|
|
||||||
<li>What attributes does the element allow that are specific to this element? <strong>A whole bunch, see ATTLIST;
|
|
||||||
we're going to do the vital ones: <code>action</code>, <code>method</code> and <code>name</code></strong></li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Time for some code:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>$config = HTMLPurifier_Config::createDefault();
|
|
||||||
$config->set('HTML.DefinitionID', 'enduser-customize.html tutorial');
|
|
||||||
$config->set('HTML.DefinitionRev', 1);
|
|
||||||
$config->set('Cache.DefinitionImpl', null); // remove this later!
|
|
||||||
$def = $config->getHTMLDefinition(true);
|
|
||||||
$def->addAttribute('a', 'target', new HTMLPurifier_AttrDef_Enum(
|
|
||||||
array('_blank','_self','_target','_top')
|
|
||||||
));
|
|
||||||
<strong>$form = $def->addElement(
|
|
||||||
'form', // name
|
|
||||||
'Block', // content set
|
|
||||||
'Flow', // allowed children
|
|
||||||
'Common', // attribute collection
|
|
||||||
array( // attributes
|
|
||||||
'action*' => 'URI',
|
|
||||||
'method' => 'Enum#get|post',
|
|
||||||
'name' => 'ID'
|
|
||||||
)
|
|
||||||
);
|
|
||||||
$form->excludes = array('form' => true);</strong></pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Each of the parameters corresponds to one of the questions we asked.
|
|
||||||
Notice that we added an asterisk to the end of the <code>action</code>
|
|
||||||
attribute to indicate that it is required. If someone specifies a
|
|
||||||
<code>form</code> without that attribute, the tag will be axed.
|
|
||||||
Also, the extra line at the end is a special extra declaration that
|
|
||||||
prevents forms from being nested within each other.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
And that's all there is to it! Implementing the rest of the form
|
|
||||||
module is left as an exercise to the user; to see more examples
|
|
||||||
check the <a href="http://repo.or.cz/w/htmlpurifier.git?a=tree;hb=HEAD;f=library/HTMLPurifier/HTMLModule"><code>library/HTMLPurifier/HTMLModule/</code></a> directory
|
|
||||||
in your local HTML Purifier installation.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>And beyond...</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Perceptive users may have realized that, to a certain extent, we
|
|
||||||
have simply re-implemented the facilities of XML Schema or the
|
|
||||||
Document Type Definition. What you are seeing here, however, is
|
|
||||||
not just an XML Schema or Document Type Definition: it is a fully
|
|
||||||
expressive method of specifying the definition of HTML that is
|
|
||||||
a portable superset of the capabilities of the two above-mentioned schema
|
|
||||||
languages. What makes HTMLDefinition so powerful is the fact that
|
|
||||||
if we don't have an implementation for a content model or an attribute
|
|
||||||
definition, you can supply it yourself by writing a PHP class.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
There are many facets of HTMLDefinition beyond the Advanced API I have
|
|
||||||
walked you through today. To find out more about these, you can
|
|
||||||
check out these source files:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><a href="http://repo.or.cz/w/htmlpurifier.git?a=blob;hb=HEAD;f=library/HTMLPurifier/HTMLModule.php"><code>library/HTMLPurifier/HTMLModule.php</code></a></li>
|
|
||||||
<li><a href="http://repo.or.cz/w/htmlpurifier.git?a=blob;hb=HEAD;f=library/HTMLPurifier/ElementDef.php"><code>library/HTMLPurifier/ElementDef.php</code></a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 id="optimized">Notes for HTML Purifier 4.2.0 and earlier</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Previously, this tutorial gave some incorrect template code for
|
|
||||||
editing raw definitions, and that template code will now produce the
|
|
||||||
error <q>Due to a documentation error in previous version of HTML
|
|
||||||
Purifier...</q> Here is how to mechanically transform old-style
|
|
||||||
code into new-style code.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
First, identify all code that edits the raw definition object, and
|
|
||||||
put it together. Ensure none of this code must be run on every
|
|
||||||
request; if some sub-part needs to always be run, move it outside
|
|
||||||
this block. Here is an example below, with the raw definition
|
|
||||||
object code bolded.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>$config = HTMLPurifier_Config::createDefault();
|
|
||||||
$config->set('HTML.DefinitionID', 'enduser-customize.html tutorial');
|
|
||||||
$config->set('HTML.DefinitionRev', 1);
|
|
||||||
$def = $config->getHTMLDefinition(true);
|
|
||||||
<strong>$def->addAttribute('a', 'target', 'Enum#_blank,_self,_target,_top');</strong>
|
|
||||||
$purifier = new HTMLPurifier($config);</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Next, replace the raw definition retrieval with a
|
|
||||||
maybeGetRawHTMLDefinition method call inside an if conditional, and
|
|
||||||
place the editing code inside that if block.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>$config = HTMLPurifier_Config::createDefault();
|
|
||||||
$config->set('HTML.DefinitionID', 'enduser-customize.html tutorial');
|
|
||||||
$config->set('HTML.DefinitionRev', 1);
|
|
||||||
<strong>if ($def = $config->maybeGetRawHTMLDefinition()) {
|
|
||||||
$def->addAttribute('a', 'target', 'Enum#_blank,_self,_target,_top');
|
|
||||||
}</strong>
|
|
||||||
$purifier = new HTMLPurifier($config);</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
And you're done! Alternatively, if you're OK with not ever caching
|
|
||||||
your code, the following will still work and not emit warnings.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>$config = HTMLPurifier_Config::createDefault();
|
|
||||||
$def = $config->getHTMLDefinition(true);
|
|
||||||
$def->addAttribute('a', 'target', 'Enum#_blank,_self,_target,_top');
|
|
||||||
$purifier = new HTMLPurifier($config);</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
A slightly less efficient version of this was what was going on with
|
|
||||||
old versions of HTML Purifier.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<em>Technical notes:</em> ajh pointed out on <a
|
|
||||||
href="http://htmlpurifier.org/phorum/read.php?5,5164,5169#msg-5169">in a forum topic</a> that
|
|
||||||
HTML Purifier appeared to be repeatedly writing to the cache even
|
|
||||||
when a cache entry already existed. Investigation lead to the
|
|
||||||
discovery of the following infelicity: caching of customized
|
|
||||||
definitions didn't actually work! The problem was that even though
|
|
||||||
a cache file would be written out at the end of the process, there
|
|
||||||
was no way for HTML Purifier to say, <q>Actually, I've already got a
|
|
||||||
copy of your work, no need to reconfigure your
|
|
||||||
customizations</q>. This required the API to change: placing
|
|
||||||
all of the customizations to the raw definition object in a
|
|
||||||
conditional which could be skipped.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body></html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
148
vendor/ezyang/htmlpurifier/docs/enduser-id.html
vendored
|
@ -1,148 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<meta name="description" content="Explains various methods for allowing IDs in documents safely in HTML Purifier." />
|
|
||||||
<link rel="stylesheet" type="text/css" href="./style.css" />
|
|
||||||
|
|
||||||
<title>IDs - HTML Purifier</title>
|
|
||||||
|
|
||||||
</head><body>
|
|
||||||
|
|
||||||
<h1 class="subtitled">IDs</h1>
|
|
||||||
<div class="subtitle">What they are, why you should(n't) wear them, and how to deal with it</div>
|
|
||||||
|
|
||||||
<div id="filing">Filed under End-User</div>
|
|
||||||
<div id="index">Return to the <a href="index.html">index</a>.</div>
|
|
||||||
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>
|
|
||||||
|
|
||||||
<p>Prior to HTML Purifier 1.2.0, this library blithely accepted user input that
|
|
||||||
looked like this:</p>
|
|
||||||
|
|
||||||
<pre><a id="fragment">Anchor</a></pre>
|
|
||||||
|
|
||||||
<p>...presenting an attractive vector for those that would destroy standards
|
|
||||||
compliance: simply set the ID to one that is already used elsewhere in the
|
|
||||||
document and voila: validation breaks. There was a half-hearted attempt to
|
|
||||||
prevent this by allowing users to blacklist IDs, but I suspect that no one
|
|
||||||
really bothered, and thus, with the release of 1.2.0, IDs are now <em>removed</em>
|
|
||||||
by default.</p>
|
|
||||||
|
|
||||||
<p>IDs, however, are quite useful functionality to have, so if users start
|
|
||||||
complaining about broken anchors you'll probably want to turn them back on
|
|
||||||
with %Attr.EnableID. But before you go mucking around with the config
|
|
||||||
object, it's probably worth to take some precautions to keep your page
|
|
||||||
validating. Why?</p>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>Standards-compliant pages are good</li>
|
|
||||||
<li>Duplicated IDs interfere with anchors. If there are two id="foobar"s in a
|
|
||||||
document, which spot does a browser presented with the fragment #foobar go
|
|
||||||
to? Most browsers opt for the first appearing ID, making it impossible
|
|
||||||
to references the second section. Similarly, duplicated IDs can hijack
|
|
||||||
client-side scripting that relies on the IDs of elements.</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>You have (currently) four ways of dealing with the problem.</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="subtitled">Blacklisting IDs</h2>
|
|
||||||
<div class="subsubtitle">Good for pages with single content source and stable templates</div>
|
|
||||||
|
|
||||||
<p>Keeping in terms with the
|
|
||||||
<acronym title="Keep It Simple, Stupid">KISS</acronym> principle, let us
|
|
||||||
deal with the most obvious solution: preventing users from using any IDs that
|
|
||||||
appear elsewhere on the document. The method is simple:</p>
|
|
||||||
|
|
||||||
<pre>$config->set('Attr.EnableID', true);
|
|
||||||
$config->set('Attr.IDBlacklist' array(
|
|
||||||
'list', 'of', 'attribute', 'values', 'that', 'are', 'forbidden'
|
|
||||||
));</pre>
|
|
||||||
|
|
||||||
<p>That being said, there are some notable drawbacks. First of all, you have to
|
|
||||||
know precisely which IDs are being used by the HTML surrounding the user code.
|
|
||||||
This is easier said than done: quite often the page designer and the system
|
|
||||||
coder work separately, so the designer has to constantly be talking with the
|
|
||||||
coder whenever he decides to add a new anchor. Miss one and you open yourself
|
|
||||||
to possible standards-compliance issues.</p>
|
|
||||||
|
|
||||||
<p>Furthermore, this position becomes untenable when a single web page must hold
|
|
||||||
multiple portions of user-submitted content. Since there's obviously no way
|
|
||||||
to find out before-hand what IDs users will use, the blacklist is helpless.
|
|
||||||
And since HTML Purifier validates each segment separately, perhaps doing
|
|
||||||
so at different times, it would be extremely difficult to dynamically update
|
|
||||||
the blacklist in between runs.</p>
|
|
||||||
|
|
||||||
<p>Finally, simply destroying the ID is extremely un-userfriendly behavior: after
|
|
||||||
all, they might have simply specified a duplicate ID by accident.</p>
|
|
||||||
|
|
||||||
<p>Thus, we get to our second method.</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="subtitled">Namespacing IDs</h2>
|
|
||||||
<div class="subsubtitle">Lazy developer's way, but needs user education</div>
|
|
||||||
|
|
||||||
<p>This method, too, is quite simple: add a prefix to all user IDs. With this
|
|
||||||
code:</p>
|
|
||||||
|
|
||||||
<pre>$config->set('Attr.EnableID', true);
|
|
||||||
$config->set('Attr.IDPrefix', 'user_');</pre>
|
|
||||||
|
|
||||||
<p>...this:</p>
|
|
||||||
|
|
||||||
<pre><a id="foobar">Anchor!</a></pre>
|
|
||||||
|
|
||||||
<p>...turns into:</p>
|
|
||||||
|
|
||||||
<pre><a id="user_foobar">Anchor!</a></pre>
|
|
||||||
|
|
||||||
<p>As long as you don't have any IDs that start with user_, collisions are
|
|
||||||
guaranteed not to happen. The drawback is obvious: if a user submits
|
|
||||||
id="foobar", they probably expect to be able to reference their page with
|
|
||||||
#foobar. You'll have to tell them, "No, that doesn't work, you have to add
|
|
||||||
user_ to the beginning."</p>
|
|
||||||
|
|
||||||
<p>And yes, things get hairier. Even with a nice prefix, we still have done
|
|
||||||
nothing about multiple HTML Purifier outputs on one page. Thus, we have
|
|
||||||
a second configuration value to piggy-back off of: %Attr.IDPrefixLocal:</p>
|
|
||||||
|
|
||||||
<pre>$config->set('Attr.IDPrefixLocal', 'comment' . $id . '_');</pre>
|
|
||||||
|
|
||||||
<p>This new attributes does nothing but append on to regular IDPrefix, but is
|
|
||||||
special in that it is volatile: it's value is determined at run-time and
|
|
||||||
cannot possibly be cordoned into, say, a .ini config file. As for what to
|
|
||||||
put into the directive, is up to you, but I would recommend the ID number
|
|
||||||
the text has been assigned in the database. Whatever you pick, however, it
|
|
||||||
has to be unique and stable for the text you are validating. Note, however,
|
|
||||||
that we require that %Attr.IDPrefix be set before you use this directive.</p>
|
|
||||||
|
|
||||||
<p>And also remember: the user has to know what this prefix is too!</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Abstinence</h2>
|
|
||||||
|
|
||||||
<p>You may not want to bother. That's okay too, just don't enable IDs.</p>
|
|
||||||
|
|
||||||
<p>Personally, I would take this road whenever user-submitted content would be
|
|
||||||
possibly be shown together on one page. Why a blog comment would need to use
|
|
||||||
anchors is beyond me.</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Denial</h2>
|
|
||||||
|
|
||||||
<p>To revert back to pre-1.2.0 behavior, simply:</p>
|
|
||||||
|
|
||||||
<pre>$config->set('Attr.EnableID', true);</pre>
|
|
||||||
|
|
||||||
<p>Don't come crying to me when your page mysteriously stops validating, though.</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
|
@ -1,59 +0,0 @@
|
||||||
|
|
||||||
HTML Purifier
|
|
||||||
by Edward Z. Yang
|
|
||||||
|
|
||||||
There are a number of ad hoc HTML filtering solutions out there on the web
|
|
||||||
(some examples including HTML_Safe, kses and SafeHtmlChecker.class.php) that
|
|
||||||
claim to filter HTML properly, preventing malicious JavaScript and layout
|
|
||||||
breaking HTML from getting through the parser. None of them, however,
|
|
||||||
demonstrates a thorough knowledge of neither the DTD that defines the HTML
|
|
||||||
nor the caveats of HTML that cannot be expressed by a DTD. Configurable
|
|
||||||
filters (such as kses or PHP's built-in striptags() function) have trouble
|
|
||||||
validating the contents of attributes and can be subject to security attacks
|
|
||||||
due to poor configuration. Other filters take the naive approach of
|
|
||||||
blacklisting known threats and tags, failing to account for the introduction
|
|
||||||
of new technologies, new tags, new attributes or quirky browser behavior.
|
|
||||||
|
|
||||||
However, HTML Purifier takes a different approach, one that doesn't use
|
|
||||||
specification-ignorant regexes or narrow blacklists. HTML Purifier will
|
|
||||||
decompose the whole document into tokens, and rigorously process the tokens by:
|
|
||||||
removing non-whitelisted elements, transforming bad practice tags like <font>
|
|
||||||
into <span>, properly checking the nesting of tags and their children and
|
|
||||||
validating all attributes according to their RFCs.
|
|
||||||
|
|
||||||
To my knowledge, there is nothing like this on the web yet. Not even MediaWiki,
|
|
||||||
which allows an amazingly diverse mix of HTML and wikitext in its documents,
|
|
||||||
gets all the nesting quirks right. Existing solutions hope that no JavaScript
|
|
||||||
will slip through, but either do not attempt to ensure that the resulting
|
|
||||||
output is valid XHTML or send the HTML through a draconic XML parser (and yet
|
|
||||||
still get the nesting wrong: SafeHtmlChecker.class.php does not prevent <a>
|
|
||||||
tags from being nested within each other).
|
|
||||||
|
|
||||||
This document no longer is a detailed description of how HTMLPurifier works,
|
|
||||||
as those descriptions have been moved to the appropriate code. The first
|
|
||||||
draft was drawn up after two rough code sketches and the implementation of a
|
|
||||||
forgiving lexer. You may also be interested in the unit tests located in the
|
|
||||||
tests/ folder, which provide a living document on how exactly the filter deals
|
|
||||||
with malformed input.
|
|
||||||
|
|
||||||
In summary (see corresponding classes for more details):
|
|
||||||
|
|
||||||
1. Parse document into an array of tag and text tokens (Lexer)
|
|
||||||
2. Remove all elements not on whitelist and transform certain other elements
|
|
||||||
into acceptable forms (i.e. <font>)
|
|
||||||
3. Make document well formed while helpfully taking into account certain quirks,
|
|
||||||
such as the fact that <p> tags traditionally are closed by other block-level
|
|
||||||
elements.
|
|
||||||
4. Run through all nodes and check children for proper order (especially
|
|
||||||
important for tables).
|
|
||||||
5. Validate attributes according to more restrictive definitions based on the
|
|
||||||
RFCs.
|
|
||||||
6. Translate back into a string. (Generator)
|
|
||||||
|
|
||||||
HTML Purifier is best suited for documents that require a rich array of
|
|
||||||
HTML tags. Things like blog comments are, in all likelihood, most appropriately
|
|
||||||
written in an extremely restrictive set of markup that doesn't require
|
|
||||||
all this functionality (or not written in HTML at all), although this may
|
|
||||||
be changing in the future with the addition of levels of filtering.
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
|
@ -1,18 +0,0 @@
|
||||||
|
|
||||||
Security
|
|
||||||
|
|
||||||
Like anything that claims to afford security, HTML_Purifier can be circumvented
|
|
||||||
through negligence of people. This class will do its job: no more, no less,
|
|
||||||
and it's up to you to provide it the proper information and proper context
|
|
||||||
to be effective. Things to remember:
|
|
||||||
|
|
||||||
1. Character Encoding: see enduser-utf8.html for more info.
|
|
||||||
|
|
||||||
2. IDs: see enduser-id.html for more info
|
|
||||||
|
|
||||||
3. URIs: see enduser-uri-filter.html
|
|
||||||
|
|
||||||
4. CSS: document pending
|
|
||||||
Explain which CSS styles we blocked and why.
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
120
vendor/ezyang/htmlpurifier/docs/enduser-slow.html
vendored
|
@ -1,120 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<meta name="description" content="Explains how to speed up HTML Purifier through caching or inbound filtering." />
|
|
||||||
<link rel="stylesheet" type="text/css" href="./style.css" />
|
|
||||||
|
|
||||||
<title>Speeding up HTML Purifier - HTML Purifier</title>
|
|
||||||
|
|
||||||
</head><body>
|
|
||||||
|
|
||||||
<h1 class="subtitled">Speeding up HTML Purifier</h1>
|
|
||||||
<div class="subtitle">...also known as the HELP ME LIBRARY IS TOO SLOW MY PAGE TAKE TOO LONG page</div>
|
|
||||||
|
|
||||||
<div id="filing">Filed under End-User</div>
|
|
||||||
<div id="index">Return to the <a href="index.html">index</a>.</div>
|
|
||||||
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>
|
|
||||||
|
|
||||||
<p>HTML Purifier is a very powerful library. But with power comes great
|
|
||||||
responsibility, in the form of longer execution times. Remember, this
|
|
||||||
library isn't lightly grazing over submitted HTML: it's deconstructing
|
|
||||||
the whole thing, rigorously checking the parts, and then putting it back
|
|
||||||
together. </p>
|
|
||||||
|
|
||||||
<p>So, if it so turns out that HTML Purifier is kinda too slow for outbound
|
|
||||||
filtering, you've got a few options: </p>
|
|
||||||
|
|
||||||
<h2>Inbound filtering</h2>
|
|
||||||
|
|
||||||
<p>Perform filtering of HTML when it's submitted by the user. Since the
|
|
||||||
user is already submitting something, an extra half a second tacked on
|
|
||||||
to the load time probably isn't going to be that huge of a problem.
|
|
||||||
Then, displaying the content is a simple a manner of outputting it
|
|
||||||
directly from your database/filesystem. The trouble with this method is
|
|
||||||
that your user loses the original text, and when doing edits, will be
|
|
||||||
handling the filtered text. While this may be a good thing, especially
|
|
||||||
if you're using a WYSIWYG editor, it can also result in data-loss if a
|
|
||||||
user makes a typo. </p>
|
|
||||||
|
|
||||||
<p>Example (non-functional):</p>
|
|
||||||
|
|
||||||
<pre><?php
|
|
||||||
/**
|
|
||||||
* FORM SUBMISSION PAGE
|
|
||||||
* display_error($message) : displays nice error page with message
|
|
||||||
* display_success() : displays a nice success page
|
|
||||||
* display_form() : displays the HTML submission form
|
|
||||||
* database_insert($html) : inserts data into database as new row
|
|
||||||
*/
|
|
||||||
if (!empty($_POST)) {
|
|
||||||
require_once '/path/to/library/HTMLPurifier.auto.php';
|
|
||||||
require_once 'HTMLPurifier.func.php';
|
|
||||||
$dirty_html = isset($_POST['html']) ? $_POST['html'] : false;
|
|
||||||
if (!$dirty_html) {
|
|
||||||
display_error('You must write some HTML!');
|
|
||||||
}
|
|
||||||
$html = HTMLPurifier($dirty_html);
|
|
||||||
database_insert($html);
|
|
||||||
display_success();
|
|
||||||
// notice that $dirty_html is *not* saved
|
|
||||||
} else {
|
|
||||||
display_form();
|
|
||||||
}
|
|
||||||
?></pre>
|
|
||||||
|
|
||||||
<h2>Caching the filtered output</h2>
|
|
||||||
|
|
||||||
<p>Accept the submitted text and put it unaltered into the database, but
|
|
||||||
then also generate a filtered version and stash that in the database.
|
|
||||||
Serve the filtered version to readers, and the unaltered version to
|
|
||||||
editors. If need be, you can invalidate the cache and have the cached
|
|
||||||
filtered version be regenerated on the first page view. Pros? Full data
|
|
||||||
retention. Cons? It's more complicated, and opens other editors up to
|
|
||||||
XSS if they are using a WYSIWYG editor (to fix that, they'd have to be
|
|
||||||
able to get their hands on the *really* original text served in
|
|
||||||
plaintext mode). </p>
|
|
||||||
|
|
||||||
<p>Example (non-functional):</p>
|
|
||||||
|
|
||||||
<pre><?php
|
|
||||||
/**
|
|
||||||
* VIEW PAGE
|
|
||||||
* display_error($message) : displays nice error page with message
|
|
||||||
* cache_get($id) : retrieves HTML from fast cache (db or file)
|
|
||||||
* cache_insert($id, $html) : inserts good HTML into cache system
|
|
||||||
* database_get($id) : retrieves raw HTML from database
|
|
||||||
*/
|
|
||||||
$id = isset($_GET['id']) ? (int) $_GET['id'] : false;
|
|
||||||
if (!$id) {
|
|
||||||
display_error('Must specify ID.');
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
$html = cache_get($id); // filesystem or database
|
|
||||||
if ($html === false) {
|
|
||||||
// cache didn't have the HTML, generate it
|
|
||||||
$raw_html = database_get($id);
|
|
||||||
require_once '/path/to/library/HTMLPurifier.auto.php';
|
|
||||||
require_once 'HTMLPurifier.func.php';
|
|
||||||
$html = HTMLPurifier($raw_html);
|
|
||||||
cache_insert($id, $html);
|
|
||||||
}
|
|
||||||
echo $html;
|
|
||||||
?></pre>
|
|
||||||
|
|
||||||
<h2>Summary</h2>
|
|
||||||
|
|
||||||
<p>In short, inbound filtering is the simple option and caching is the
|
|
||||||
robust option (albeit with bigger storage requirements). </p>
|
|
||||||
|
|
||||||
<p>There is a third option, independent of the two we've discussed: profile
|
|
||||||
and optimize HTMLPurifier yourself. Be sure to report back your results
|
|
||||||
if you decide to do that! Especially if you port HTML Purifier to C++.
|
|
||||||
<tt>;-)</tt></p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
231
vendor/ezyang/htmlpurifier/docs/enduser-tidy.html
vendored
|
@ -1,231 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<meta name="description" content="Tutorial for tweaking HTML Purifier's Tidy-like behavior." />
|
|
||||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
|
||||||
|
|
||||||
<title>Tidy - HTML Purifier</title>
|
|
||||||
|
|
||||||
</head><body>
|
|
||||||
|
|
||||||
<h1>Tidy</h1>
|
|
||||||
|
|
||||||
<div id="filing">Filed under Development</div>
|
|
||||||
<div id="index">Return to the <a href="index.html">index</a>.</div>
|
|
||||||
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>
|
|
||||||
|
|
||||||
<p>You've probably heard of HTML Tidy, Dave Raggett's little piece
|
|
||||||
of software that cleans up poorly written HTML. Let me say it straight
|
|
||||||
out:</p>
|
|
||||||
|
|
||||||
<p class="emphasis">This ain't HTML Tidy!</p>
|
|
||||||
|
|
||||||
<p>Rather, Tidy stands for a cool set of Tidy-inspired features in HTML Purifier
|
|
||||||
that allows users to submit deprecated elements and attributes and get
|
|
||||||
valid strict markup back. For example:</p>
|
|
||||||
|
|
||||||
<pre><center>Centered</center></pre>
|
|
||||||
|
|
||||||
<p>...becomes:</p>
|
|
||||||
|
|
||||||
<pre><div style="text-align:center;">Centered</div></pre>
|
|
||||||
|
|
||||||
<p>...when this particular fix is run on the HTML. This tutorial will give
|
|
||||||
you the lowdown of what exactly HTML Purifier will do when Tidy
|
|
||||||
is on, and how to fine-tune this behavior. Once again, <strong>you do
|
|
||||||
not need Tidy installed on your PHP to use these features!</strong></p>
|
|
||||||
|
|
||||||
<h2>What does it do?</h2>
|
|
||||||
|
|
||||||
<p>Tidy will do several things to your HTML:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Convert deprecated elements and attributes to standards-compliant
|
|
||||||
alternatives</li>
|
|
||||||
<li>Enforce XHTML compatibility guidelines and other best practices</li>
|
|
||||||
<li>Preserve data that would normally be removed as per W3C</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2>What are levels?</h2>
|
|
||||||
|
|
||||||
<p>Levels describe how aggressive the Tidy module should be when
|
|
||||||
cleaning up HTML. There are four levels to pick: none, light, medium
|
|
||||||
and heavy. Each of these levels has a well-defined set of behavior
|
|
||||||
associated with it, although it may change depending on your doctype.</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>light</dt>
|
|
||||||
<dd>This is the <strong>lenient</strong> level. If a tag or attribute
|
|
||||||
is about to be removed because it isn't supported by the
|
|
||||||
doctype, Tidy will step in and change into an alternative that
|
|
||||||
is supported.</dd>
|
|
||||||
<dt>medium</dt>
|
|
||||||
<dd>This is the <strong>correctional</strong> level. At this level,
|
|
||||||
all the functions of light are performed, as well as some extra,
|
|
||||||
non-essential best practices enforcement. Changes made on this
|
|
||||||
level are very benign and are unlikely to cause problems.</dd>
|
|
||||||
<dt>heavy</dt>
|
|
||||||
<dd>This is the <strong>aggressive</strong> level. If a tag or
|
|
||||||
attribute is deprecated, it will be converted into a non-deprecated
|
|
||||||
version, no ifs ands or buts.</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<p>By default, Tidy operates on the <strong>medium</strong> level. You can
|
|
||||||
change the level of cleaning by setting the %HTML.TidyLevel configuration
|
|
||||||
directive:</p>
|
|
||||||
|
|
||||||
<pre>$config->set('HTML.TidyLevel', 'heavy'); // burn baby burn!</pre>
|
|
||||||
|
|
||||||
<h2>Is the light level really light?</h2>
|
|
||||||
|
|
||||||
<p>It depends on what doctype you're using. If your documents are HTML
|
|
||||||
4.01 <em>Transitional</em>, HTML Purifier will be lazy
|
|
||||||
and won't clean up your <code>center</code>
|
|
||||||
or <code>font</code> tags. But if you're using HTML 4.01 <em>Strict</em>,
|
|
||||||
HTML Purifier has no choice: it has to convert them, or they will
|
|
||||||
be nuked out of existence. So while light on Transitional will result
|
|
||||||
in little to no changes, light on Strict will still result in quite
|
|
||||||
a lot of fixes.</p>
|
|
||||||
|
|
||||||
<p>This is different behavior from 1.6 or before, where deprecated
|
|
||||||
tags in transitional documents would
|
|
||||||
always be cleaned up regardless. This is also better behavior.</p>
|
|
||||||
|
|
||||||
<h2>My pages look different!</h2>
|
|
||||||
|
|
||||||
<p>HTML Purifier is tasked with converting deprecated tags and
|
|
||||||
attributes to standards-compliant alternatives, which usually
|
|
||||||
need copious amounts of CSS. It's also not foolproof: sometimes
|
|
||||||
things do get lost in the translation. This is why when HTML Purifier
|
|
||||||
can get away with not doing cleaning, it won't; this is why
|
|
||||||
the default value is <strong>medium</strong> and not heavy.</p>
|
|
||||||
|
|
||||||
<p>Fortunately, only a few attributes have problems with the switch
|
|
||||||
over. They are described below:</p>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead><tr>
|
|
||||||
<th>Element@Attr</th>
|
|
||||||
<th>Changes</th>
|
|
||||||
</tr></thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>caption@align</td>
|
|
||||||
<td>Firefox supports stuffing the caption on the
|
|
||||||
left and right side of the table, a feature that
|
|
||||||
Internet Explorer, understandably, does not have.
|
|
||||||
When align equals right or left, the text will simply
|
|
||||||
be aligned on the left or right side.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>img@align</td>
|
|
||||||
<td>The implementation for align bottom is good, but not
|
|
||||||
perfect. There are a few pixel differences.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>br@clear</td>
|
|
||||||
<td>Clear both gets a little wonky in Internet Explorer. Haven't
|
|
||||||
really been able to figure out why.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>hr@noshade</td>
|
|
||||||
<td>All browsers implement this slightly differently: we've
|
|
||||||
chosen to make noshade horizontal rules gray.</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>There are a few more minor, although irritating, bugs.
|
|
||||||
Some older browsers support deprecated attributes,
|
|
||||||
but not CSS. Transformed elements and attributes will look unstyled
|
|
||||||
to said browsers. Also, CSS precedence is slightly different for
|
|
||||||
inline styles versus presentational markup. In increasing precedence:</p>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>Presentational attributes</li>
|
|
||||||
<li>External style sheets</li>
|
|
||||||
<li>Inline styling</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>This means that styling that may have been masked by external CSS
|
|
||||||
declarations will start showing up (a good thing, perhaps). Finally,
|
|
||||||
if you've turned off the style attribute, almost all of
|
|
||||||
these transformations will not work. Sorry mates.</p>
|
|
||||||
|
|
||||||
<p>You can review the rendering before and after of these transformations
|
|
||||||
by consulting the <a
|
|
||||||
href="http://htmlpurifier.org/live/smoketests/attrTransform.php">attrTransform.php
|
|
||||||
smoketest</a>.</p>
|
|
||||||
|
|
||||||
<h2>I like the general idea, but the specifics bug me!</h2>
|
|
||||||
|
|
||||||
<p>So you want HTML Purifier to clean up your HTML, but you're not
|
|
||||||
so happy about the br@clear implementation. That's perfectly fine!
|
|
||||||
HTML Purifier will make accomodations:</p>
|
|
||||||
|
|
||||||
<pre>$config->set('HTML.Doctype', 'XHTML 1.0 Transitional');
|
|
||||||
$config->set('HTML.TidyLevel', 'heavy'); // all changes, minus...
|
|
||||||
<strong>$config->set('HTML.TidyRemove', 'br@clear');</strong></pre>
|
|
||||||
|
|
||||||
<p>That third line does the magic, removing the br@clear fix
|
|
||||||
from the module, ensuring that <code><br clear="both" /></code>
|
|
||||||
will pass through unharmed. The reverse is possible too:</p>
|
|
||||||
|
|
||||||
<pre>$config->set('HTML.Doctype', 'XHTML 1.0 Transitional');
|
|
||||||
$config->set('HTML.TidyLevel', 'none'); // no changes, plus...
|
|
||||||
<strong>$config->set('HTML.TidyAdd', 'p@align');</strong></pre>
|
|
||||||
|
|
||||||
<p>In this case, all transformations are shut off, except for the p@align
|
|
||||||
one, which you found handy.</p>
|
|
||||||
|
|
||||||
<p>To find out what the names of fixes you want to turn on or off are,
|
|
||||||
you'll have to consult the source code, specifically the files in
|
|
||||||
<code>HTMLPurifier/HTMLModule/Tidy/</code>. There is, however, a
|
|
||||||
general syntax:</p>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Example</th>
|
|
||||||
<th>Interpretation</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>element</td>
|
|
||||||
<td>font</td>
|
|
||||||
<td>Tag transform for <em>element</em></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>element@attr</td>
|
|
||||||
<td>br@clear</td>
|
|
||||||
<td>Attribute transform for <em>attr</em> on <em>element</em></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>@attr</td>
|
|
||||||
<td>@lang</td>
|
|
||||||
<td>Global attribute transform for <em>attr</em></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>e#content_model_type</td>
|
|
||||||
<td>blockquote#content_model_type</td>
|
|
||||||
<td>Change of child processing implementation for <em>e</em></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<h2>So... what's the lowdown?</h2>
|
|
||||||
|
|
||||||
<p>The lowdown is, quite frankly, HTML Purifier's default settings are
|
|
||||||
probably good enough. The next step is to bump the level up to heavy,
|
|
||||||
and if that still doesn't satisfy your appetite, do some fine-tuning.
|
|
||||||
Other than that, don't worry about it: this all works silently and
|
|
||||||
effectively in the background.</p>
|
|
||||||
|
|
||||||
</body></html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
|
@ -1,204 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<meta name="description" content="Tutorial for creating custom URI filters." />
|
|
||||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
|
||||||
|
|
||||||
<title>URI Filters - HTML Purifier</title>
|
|
||||||
|
|
||||||
</head><body>
|
|
||||||
|
|
||||||
<h1>URI Filters</h1>
|
|
||||||
|
|
||||||
<div id="filing">Filed under End-User</div>
|
|
||||||
<div id="index">Return to the <a href="index.html">index</a>.</div>
|
|
||||||
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This is a quick and dirty document to get you on your way to writing
|
|
||||||
custom URI filters for your own URL filtering needs. Why would you
|
|
||||||
want to write a URI filter? If you need URIs your users put into
|
|
||||||
HTML to magically change into a different URI, this is
|
|
||||||
exactly what you need!
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>Creating the class</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Any URI filter you make will be a subclass of <code>HTMLPurifier_URIFilter</code>.
|
|
||||||
The scaffolding is thus:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>class HTMLPurifier_URIFilter_<strong>NameOfFilter</strong> extends HTMLPurifier_URIFilter
|
|
||||||
{
|
|
||||||
public $name = '<strong>NameOfFilter</strong>';
|
|
||||||
public function prepare($config) {}
|
|
||||||
public function filter(&$uri, $config, $context) {}
|
|
||||||
}</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Fill in the variable <code>$name</code> with the name of your filter, and
|
|
||||||
take a look at the two methods. <code>prepare()</code> is an initialization
|
|
||||||
method that is called only once, before any filtering has been done of the
|
|
||||||
HTML. Use it to perform any costly setup work that only needs to be done
|
|
||||||
once. <code>filter()</code> is the guts and innards of our filter:
|
|
||||||
it takes the URI and does whatever needs to be done to it.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
If you've worked with HTML Purifier, you'll recognize the <code>$config</code>
|
|
||||||
and <code>$context</code> parameters. On the other hand, <code>$uri</code>
|
|
||||||
is something unique to this section of the application: it's a
|
|
||||||
<code>HTMLPurifier_URI</code> object. The interface is thus:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>class HTMLPurifier_URI
|
|
||||||
{
|
|
||||||
public $scheme, $userinfo, $host, $port, $path, $query, $fragment;
|
|
||||||
public function HTMLPurifier_URI($scheme, $userinfo, $host, $port, $path, $query, $fragment);
|
|
||||||
public function toString();
|
|
||||||
public function copy();
|
|
||||||
public function getSchemeObj($config, $context);
|
|
||||||
public function validate($config, $context);
|
|
||||||
}</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The first three methods are fairly self-explanatory: you have a constructor,
|
|
||||||
a serializer, and a cloner. Generally, you won't be using them when
|
|
||||||
you are manipulating the URI objects themselves.
|
|
||||||
<code>getSchemeObj()</code> is a special purpose method that returns
|
|
||||||
a <code>HTMLPurifier_URIScheme</code> object corresponding to the specific
|
|
||||||
URI at hand. <code>validate()</code> performs general-purpose validation
|
|
||||||
on the internal components of a URI. Once again, you don't need to
|
|
||||||
worry about these: they've already been handled for you.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>URI format</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
As a URIFilter, we're interested in the member variables of the URI object.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<table class="quick"><tbody>
|
|
||||||
<tr><th>Scheme</th> <td>The protocol for identifying (and possibly locating) a resource (http, ftp, https)</td></tr>
|
|
||||||
<tr><th>Userinfo</th> <td>User information such as a username (bob)</td></tr>
|
|
||||||
<tr><th>Host</th> <td>Domain name or IP address of the server (example.com, 127.0.0.1)</td></tr>
|
|
||||||
<tr><th>Port</th> <td>Network port number for the server (80, 12345)</td></tr>
|
|
||||||
<tr><th>Path</th> <td>Data that identifies the resource, possibly hierarchical (/path/to, ed@example.com)</td></tr>
|
|
||||||
<tr><th>Query</th> <td>String of information to be interpreted by the resource (?q=search-term)</td></tr>
|
|
||||||
<tr><th>Fragment</th> <td>Additional information for the resource after retrieval (#bookmark)</td></tr>
|
|
||||||
</tbody></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Because the URI is presented to us in this form, and not
|
|
||||||
<code>http://bob@example.com:8080/foo.php?q=string#hash</code>, it saves us
|
|
||||||
a lot of trouble in having to parse the URI every time we want to filter
|
|
||||||
it. For the record, the above URI has the following components:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<table class="quick"><tbody>
|
|
||||||
<tr><th>Scheme</th> <td>http</td></tr>
|
|
||||||
<tr><th>Userinfo</th> <td>bob</td></tr>
|
|
||||||
<tr><th>Host</th> <td>example.com</td></tr>
|
|
||||||
<tr><th>Port</th> <td>8080</td></tr>
|
|
||||||
<tr><th>Path</th> <td>/foo.php</td></tr>
|
|
||||||
<tr><th>Query</th> <td>q=string</td></tr>
|
|
||||||
<tr><th>Fragment</th> <td>hash</td></tr>
|
|
||||||
</tbody></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Note that there is no question mark or octothorpe in the query or
|
|
||||||
fragment: these get removed during parsing.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
With this information, you can get straight to implementing your
|
|
||||||
<code>filter()</code> method. But one more thing...
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>Return value: Boolean, not URI</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You may have noticed that the URI is being passed in by reference.
|
|
||||||
This means that whatever changes you make to it, those changes will
|
|
||||||
be reflected in the URI object the callee had. <strong>Do not
|
|
||||||
return the URI object: it is unnecessary and will cause bugs.</strong>
|
|
||||||
Instead, return a boolean value, true if the filtering was successful,
|
|
||||||
or false if the URI is beyond repair and needs to be axed.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Let's suppose I wanted to write a filter that converted links with a
|
|
||||||
custom <code>image</code> scheme to its corresponding real path on
|
|
||||||
our website:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>class HTMLPurifier_URIFilter_TransformImageScheme extends HTMLPurifier_URIFilter
|
|
||||||
{
|
|
||||||
public $name = 'TransformImageScheme';
|
|
||||||
public function filter(&$uri, $config, $context) {
|
|
||||||
if ($uri->scheme !== 'image') return true;
|
|
||||||
$img_name = $uri->path;
|
|
||||||
// Overwrite the previous URI object
|
|
||||||
$uri = new HTMLPurifier_URI('http', null, null, null, '/img/' . $img_name . '.png', null, null);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Notice I did not <code>return $uri;</code>. This filter would turn
|
|
||||||
<code>image:Foo</code> into <code>/img/Foo.png</code>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>Activating your filter</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Having a filter is all well and good, but you need to tell HTML Purifier
|
|
||||||
to use it. Fortunately, this part's simple:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>$uri = $config->getDefinition('URI');
|
|
||||||
$uri->addFilter(new HTMLPurifier_URIFilter_<strong>NameOfFilter</strong>(), $config);</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
After adding a filter, you won't be able to set configuration directives.
|
|
||||||
Structure your code accordingly.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- XXX: link to new documentation system -->
|
|
||||||
|
|
||||||
<h2>Post-filter</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Remember our TransformImageScheme filter? That filter acted before we had
|
|
||||||
performed scheme validation; otherwise, the URI would have been filtered
|
|
||||||
out when it was discovered that there was no image scheme. Well, a post-filter
|
|
||||||
is run after scheme specific validation, so it's ideal for bulk
|
|
||||||
post-processing of URIs, including munging. To specify a URI as a post-filter,
|
|
||||||
set the <code>$post</code> member variable to TRUE.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>class HTMLPurifier_URIFilter_MyPostFilter extends HTMLPurifier_URIFilter
|
|
||||||
{
|
|
||||||
public $name = 'MyPostFilter';
|
|
||||||
public $post = true;
|
|
||||||
// ... extra code here
|
|
||||||
}
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h2>Examples</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Check the
|
|
||||||
<a href="http://repo.or.cz/w/htmlpurifier.git?a=tree;hb=HEAD;f=library/HTMLPurifier/URIFilter">URIFilter</a>
|
|
||||||
directory for more implementation examples, and see <a href="proposal-new-directives.txt">the
|
|
||||||
new directives proposal document</a> for ideas on what could be implemented
|
|
||||||
as a filter.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body></html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
1060
vendor/ezyang/htmlpurifier/docs/enduser-utf8.html
vendored
153
vendor/ezyang/htmlpurifier/docs/enduser-youtube.html
vendored
|
@ -1,153 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<meta name="description" content="Explains how to safely allow the embedding of flash from trusted sites in HTML Purifier." />
|
|
||||||
<link rel="stylesheet" type="text/css" href="./style.css" />
|
|
||||||
|
|
||||||
<title>Embedding YouTube Videos - HTML Purifier</title>
|
|
||||||
|
|
||||||
</head><body>
|
|
||||||
|
|
||||||
<h1 class="subtitled">Embedding YouTube Videos</h1>
|
|
||||||
<div class="subtitle">...as well as other dangerous active content</div>
|
|
||||||
|
|
||||||
<div id="filing">Filed under End-User</div>
|
|
||||||
<div id="index">Return to the <a href="index.html">index</a>.</div>
|
|
||||||
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>
|
|
||||||
|
|
||||||
<p>Clients like their YouTube videos. It gives them a warm fuzzy feeling when
|
|
||||||
they see a neat little embedded video player on their websites that can play
|
|
||||||
the latest clips from their documentary "Fido and the Bones of Spring".
|
|
||||||
All joking aside, the ability to embed YouTube videos or other active
|
|
||||||
content in their pages is something that a lot of people like.</p>
|
|
||||||
|
|
||||||
<p>This is a <em>bad</em> idea. The moment you embed anything untrusted,
|
|
||||||
you will definitely be slammed by a manner of nasties that can be
|
|
||||||
embedded in things from your run of the mill Flash movie to
|
|
||||||
<a href="http://blog.spywareguide.com/2006/12/myspace_phish_attack_leads_use.html">Quicktime movies</a>.
|
|
||||||
Even <code>img</code> tags, which HTML Purifier allows by default, can be
|
|
||||||
dangerous. Be distrustful of anything that tells a browser to load content
|
|
||||||
from another website automatically.</p>
|
|
||||||
|
|
||||||
<p>Luckily for us, however, whitelisting saves the day. Sure, letting users
|
|
||||||
include any old random flash file could be dangerous, but if it's
|
|
||||||
from a specific website, it probably is okay. If no amount of pleading will
|
|
||||||
convince the people upstairs that they should just settle with just linking
|
|
||||||
to their movies, you may find this technique very useful.</p>
|
|
||||||
|
|
||||||
<h2>Looking in</h2>
|
|
||||||
|
|
||||||
<p>Below is custom code that allows users to embed
|
|
||||||
YouTube videos. This is not favoritism: this trick can easily be adapted for
|
|
||||||
other forms of embeddable content.</p>
|
|
||||||
|
|
||||||
<p>Usually, websites like YouTube give us boilerplate code that you can insert
|
|
||||||
into your documents. YouTube's code goes like this:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<object width="425" height="350">
|
|
||||||
<param name="movie" value="http://www.youtube.com/v/AyPzM5WK8ys" />
|
|
||||||
<param name="wmode" value="transparent" />
|
|
||||||
<embed src="http://www.youtube.com/v/AyPzM5WK8ys"
|
|
||||||
type="application/x-shockwave-flash"
|
|
||||||
wmode="transparent" width="425" height="350" />
|
|
||||||
</object>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>There are two things to note about this code:</p>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><code><embed></code> is not recognized by W3C, so if you want
|
|
||||||
standards-compliant code, you'll have to get rid of it.</li>
|
|
||||||
<li>The code is exactly the same for all instances, except for the
|
|
||||||
identifier <tt>AyPzM5WK8ys</tt> which tells us which movie file
|
|
||||||
to retrieve.</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>What point 2 means is that if we have code like <code><span
|
|
||||||
class="youtube-embed">AyPzM5WK8ys</span></code> your
|
|
||||||
application can reconstruct the full object from this small snippet that
|
|
||||||
passes through HTML Purifier <em>unharmed</em>.
|
|
||||||
<a href="http://repo.or.cz/w/htmlpurifier.git?a=blob;hb=HEAD;f=library/HTMLPurifier/Filter/YouTube.php">Show me the code!</a></p>
|
|
||||||
|
|
||||||
<p>And the corresponding usage:</p>
|
|
||||||
|
|
||||||
<pre><?php
|
|
||||||
$config->set('Filter.YouTube', true);
|
|
||||||
?></pre>
|
|
||||||
|
|
||||||
<p>There is a bit going in the two code snippets, so let's explain.</p>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>This is a Filter object, which intercepts the HTML that is
|
|
||||||
coming into and out of the purifier. You can add as many
|
|
||||||
filter objects as you like. <code>preFilter()</code>
|
|
||||||
processes the code before it gets purified, and <code>postFilter()</code>
|
|
||||||
processes the code afterwards. So, we'll use <code>preFilter()</code> to
|
|
||||||
replace the object tag with a <code>span</code>, and <code>postFilter()</code>
|
|
||||||
to restore it.</li>
|
|
||||||
<li>The first preg_replace call replaces any YouTube code users may have
|
|
||||||
embedded into the benign span tag. Span is used because it is inline,
|
|
||||||
and objects are inline too. We are very careful to be extremely
|
|
||||||
restrictive on what goes inside the span tag, as if an errant code
|
|
||||||
gets in there it could get messy.</li>
|
|
||||||
<li>The HTML is then purified as usual.</li>
|
|
||||||
<li>Then, another preg_replace replaces the span tag with a fully fledged
|
|
||||||
object. Note that the embed is removed, and, in its place, a data
|
|
||||||
attribute was added to the object. This makes the tag standards
|
|
||||||
compliant! It also breaks Internet Explorer, so we add in a bit of
|
|
||||||
conditional comments with the old embed code to make it work again.
|
|
||||||
It's all quite convoluted but works.</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<h2>Warning</h2>
|
|
||||||
|
|
||||||
<p>There are a number of possible problems with the code above, depending
|
|
||||||
on how you look at it.</p>
|
|
||||||
|
|
||||||
<h3>Cannot change width and height</h3>
|
|
||||||
|
|
||||||
<p>The width and height of the final YouTube movie cannot be adjusted. This
|
|
||||||
is because I am lazy. If you really insist on letting users change the size
|
|
||||||
of the movie, what you need to do is package up the attributes inside the
|
|
||||||
span tag (along with the movie ID). It gets complicated though: a malicious
|
|
||||||
user can specify an outrageously large height and width and attempt to crash
|
|
||||||
the user's operating system/browser. You need to either cap it by limiting
|
|
||||||
the amount of digits allowed in the regex or using a callback to check the
|
|
||||||
number.</p>
|
|
||||||
|
|
||||||
<h3>Trusts media's host's security</h3>
|
|
||||||
|
|
||||||
<p>By allowing this code onto our website, we are trusting that YouTube has
|
|
||||||
tech-savvy enough people not to allow their users to inject malicious
|
|
||||||
code into the Flash files. An exploit on YouTube means an exploit on your
|
|
||||||
site. Even though YouTube is run by the reputable Google, it
|
|
||||||
<a href="http://ha.ckers.org/blog/20061213/google-xss-vuln/">doesn't</a>
|
|
||||||
mean they are
|
|
||||||
<a href="http://ha.ckers.org/blog/20061208/xss-in-googles-orkut/">invulnerable.</a>
|
|
||||||
You're putting a certain measure of the job on an external provider (just as
|
|
||||||
you have by entrusting your user input to HTML Purifier), and
|
|
||||||
it is important that you are cognizant of the risk.</p>
|
|
||||||
|
|
||||||
<h3>Poorly written adaptations compromise security</h3>
|
|
||||||
|
|
||||||
<p>This should go without saying, but if you're going to adapt this code
|
|
||||||
for Google Video or the like, make sure you do it <em>right</em>. It's
|
|
||||||
extremely easy to allow a character too many in <code>postFilter()</code> and
|
|
||||||
suddenly you're introducing XSS into HTML Purifier's XSS free output. HTML
|
|
||||||
Purifier may be well written, but it cannot guard against vulnerabilities
|
|
||||||
introduced after it has finished.</p>
|
|
||||||
|
|
||||||
<h2>Help out!</h2>
|
|
||||||
|
|
||||||
<p>If you write a filter for your favorite video destination (or anything
|
|
||||||
like that, for that matter), send it over and it might get included
|
|
||||||
with the core!</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
|
@ -1,196 +0,0 @@
|
||||||
<!-- Portions (C) International Organization for Standardization 1986
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % HTMLlat1 PUBLIC
|
|
||||||
"-//W3C//ENTITIES Latin 1 for XHTML//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
|
|
||||||
%HTMLlat1;
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!ENTITY nbsp " "> <!-- no-break space = non-breaking space,
|
|
||||||
U+00A0 ISOnum -->
|
|
||||||
<!ENTITY iexcl "¡"> <!-- inverted exclamation mark, U+00A1 ISOnum -->
|
|
||||||
<!ENTITY cent "¢"> <!-- cent sign, U+00A2 ISOnum -->
|
|
||||||
<!ENTITY pound "£"> <!-- pound sign, U+00A3 ISOnum -->
|
|
||||||
<!ENTITY curren "¤"> <!-- currency sign, U+00A4 ISOnum -->
|
|
||||||
<!ENTITY yen "¥"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->
|
|
||||||
<!ENTITY brvbar "¦"> <!-- broken bar = broken vertical bar,
|
|
||||||
U+00A6 ISOnum -->
|
|
||||||
<!ENTITY sect "§"> <!-- section sign, U+00A7 ISOnum -->
|
|
||||||
<!ENTITY uml "¨"> <!-- diaeresis = spacing diaeresis,
|
|
||||||
U+00A8 ISOdia -->
|
|
||||||
<!ENTITY copy "©"> <!-- copyright sign, U+00A9 ISOnum -->
|
|
||||||
<!ENTITY ordf "ª"> <!-- feminine ordinal indicator, U+00AA ISOnum -->
|
|
||||||
<!ENTITY laquo "«"> <!-- left-pointing double angle quotation mark
|
|
||||||
= left pointing guillemet, U+00AB ISOnum -->
|
|
||||||
<!ENTITY not "¬"> <!-- not sign = angled dash,
|
|
||||||
U+00AC ISOnum -->
|
|
||||||
<!ENTITY shy "­"> <!-- soft hyphen = discretionary hyphen,
|
|
||||||
U+00AD ISOnum -->
|
|
||||||
<!ENTITY reg "®"> <!-- registered sign = registered trade mark sign,
|
|
||||||
U+00AE ISOnum -->
|
|
||||||
<!ENTITY macr "¯"> <!-- macron = spacing macron = overline
|
|
||||||
= APL overbar, U+00AF ISOdia -->
|
|
||||||
<!ENTITY deg "°"> <!-- degree sign, U+00B0 ISOnum -->
|
|
||||||
<!ENTITY plusmn "±"> <!-- plus-minus sign = plus-or-minus sign,
|
|
||||||
U+00B1 ISOnum -->
|
|
||||||
<!ENTITY sup2 "²"> <!-- superscript two = superscript digit two
|
|
||||||
= squared, U+00B2 ISOnum -->
|
|
||||||
<!ENTITY sup3 "³"> <!-- superscript three = superscript digit three
|
|
||||||
= cubed, U+00B3 ISOnum -->
|
|
||||||
<!ENTITY acute "´"> <!-- acute accent = spacing acute,
|
|
||||||
U+00B4 ISOdia -->
|
|
||||||
<!ENTITY micro "µ"> <!-- micro sign, U+00B5 ISOnum -->
|
|
||||||
<!ENTITY para "¶"> <!-- pilcrow sign = paragraph sign,
|
|
||||||
U+00B6 ISOnum -->
|
|
||||||
<!ENTITY middot "·"> <!-- middle dot = Georgian comma
|
|
||||||
= Greek middle dot, U+00B7 ISOnum -->
|
|
||||||
<!ENTITY cedil "¸"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
|
|
||||||
<!ENTITY sup1 "¹"> <!-- superscript one = superscript digit one,
|
|
||||||
U+00B9 ISOnum -->
|
|
||||||
<!ENTITY ordm "º"> <!-- masculine ordinal indicator,
|
|
||||||
U+00BA ISOnum -->
|
|
||||||
<!ENTITY raquo "»"> <!-- right-pointing double angle quotation mark
|
|
||||||
= right pointing guillemet, U+00BB ISOnum -->
|
|
||||||
<!ENTITY frac14 "¼"> <!-- vulgar fraction one quarter
|
|
||||||
= fraction one quarter, U+00BC ISOnum -->
|
|
||||||
<!ENTITY frac12 "½"> <!-- vulgar fraction one half
|
|
||||||
= fraction one half, U+00BD ISOnum -->
|
|
||||||
<!ENTITY frac34 "¾"> <!-- vulgar fraction three quarters
|
|
||||||
= fraction three quarters, U+00BE ISOnum -->
|
|
||||||
<!ENTITY iquest "¿"> <!-- inverted question mark
|
|
||||||
= turned question mark, U+00BF ISOnum -->
|
|
||||||
<!ENTITY Agrave "À"> <!-- latin capital letter A with grave
|
|
||||||
= latin capital letter A grave,
|
|
||||||
U+00C0 ISOlat1 -->
|
|
||||||
<!ENTITY Aacute "Á"> <!-- latin capital letter A with acute,
|
|
||||||
U+00C1 ISOlat1 -->
|
|
||||||
<!ENTITY Acirc "Â"> <!-- latin capital letter A with circumflex,
|
|
||||||
U+00C2 ISOlat1 -->
|
|
||||||
<!ENTITY Atilde "Ã"> <!-- latin capital letter A with tilde,
|
|
||||||
U+00C3 ISOlat1 -->
|
|
||||||
<!ENTITY Auml "Ä"> <!-- latin capital letter A with diaeresis,
|
|
||||||
U+00C4 ISOlat1 -->
|
|
||||||
<!ENTITY Aring "Å"> <!-- latin capital letter A with ring above
|
|
||||||
= latin capital letter A ring,
|
|
||||||
U+00C5 ISOlat1 -->
|
|
||||||
<!ENTITY AElig "Æ"> <!-- latin capital letter AE
|
|
||||||
= latin capital ligature AE,
|
|
||||||
U+00C6 ISOlat1 -->
|
|
||||||
<!ENTITY Ccedil "Ç"> <!-- latin capital letter C with cedilla,
|
|
||||||
U+00C7 ISOlat1 -->
|
|
||||||
<!ENTITY Egrave "È"> <!-- latin capital letter E with grave,
|
|
||||||
U+00C8 ISOlat1 -->
|
|
||||||
<!ENTITY Eacute "É"> <!-- latin capital letter E with acute,
|
|
||||||
U+00C9 ISOlat1 -->
|
|
||||||
<!ENTITY Ecirc "Ê"> <!-- latin capital letter E with circumflex,
|
|
||||||
U+00CA ISOlat1 -->
|
|
||||||
<!ENTITY Euml "Ë"> <!-- latin capital letter E with diaeresis,
|
|
||||||
U+00CB ISOlat1 -->
|
|
||||||
<!ENTITY Igrave "Ì"> <!-- latin capital letter I with grave,
|
|
||||||
U+00CC ISOlat1 -->
|
|
||||||
<!ENTITY Iacute "Í"> <!-- latin capital letter I with acute,
|
|
||||||
U+00CD ISOlat1 -->
|
|
||||||
<!ENTITY Icirc "Î"> <!-- latin capital letter I with circumflex,
|
|
||||||
U+00CE ISOlat1 -->
|
|
||||||
<!ENTITY Iuml "Ï"> <!-- latin capital letter I with diaeresis,
|
|
||||||
U+00CF ISOlat1 -->
|
|
||||||
<!ENTITY ETH "Ð"> <!-- latin capital letter ETH, U+00D0 ISOlat1 -->
|
|
||||||
<!ENTITY Ntilde "Ñ"> <!-- latin capital letter N with tilde,
|
|
||||||
U+00D1 ISOlat1 -->
|
|
||||||
<!ENTITY Ograve "Ò"> <!-- latin capital letter O with grave,
|
|
||||||
U+00D2 ISOlat1 -->
|
|
||||||
<!ENTITY Oacute "Ó"> <!-- latin capital letter O with acute,
|
|
||||||
U+00D3 ISOlat1 -->
|
|
||||||
<!ENTITY Ocirc "Ô"> <!-- latin capital letter O with circumflex,
|
|
||||||
U+00D4 ISOlat1 -->
|
|
||||||
<!ENTITY Otilde "Õ"> <!-- latin capital letter O with tilde,
|
|
||||||
U+00D5 ISOlat1 -->
|
|
||||||
<!ENTITY Ouml "Ö"> <!-- latin capital letter O with diaeresis,
|
|
||||||
U+00D6 ISOlat1 -->
|
|
||||||
<!ENTITY times "×"> <!-- multiplication sign, U+00D7 ISOnum -->
|
|
||||||
<!ENTITY Oslash "Ø"> <!-- latin capital letter O with stroke
|
|
||||||
= latin capital letter O slash,
|
|
||||||
U+00D8 ISOlat1 -->
|
|
||||||
<!ENTITY Ugrave "Ù"> <!-- latin capital letter U with grave,
|
|
||||||
U+00D9 ISOlat1 -->
|
|
||||||
<!ENTITY Uacute "Ú"> <!-- latin capital letter U with acute,
|
|
||||||
U+00DA ISOlat1 -->
|
|
||||||
<!ENTITY Ucirc "Û"> <!-- latin capital letter U with circumflex,
|
|
||||||
U+00DB ISOlat1 -->
|
|
||||||
<!ENTITY Uuml "Ü"> <!-- latin capital letter U with diaeresis,
|
|
||||||
U+00DC ISOlat1 -->
|
|
||||||
<!ENTITY Yacute "Ý"> <!-- latin capital letter Y with acute,
|
|
||||||
U+00DD ISOlat1 -->
|
|
||||||
<!ENTITY THORN "Þ"> <!-- latin capital letter THORN,
|
|
||||||
U+00DE ISOlat1 -->
|
|
||||||
<!ENTITY szlig "ß"> <!-- latin small letter sharp s = ess-zed,
|
|
||||||
U+00DF ISOlat1 -->
|
|
||||||
<!ENTITY agrave "à"> <!-- latin small letter a with grave
|
|
||||||
= latin small letter a grave,
|
|
||||||
U+00E0 ISOlat1 -->
|
|
||||||
<!ENTITY aacute "á"> <!-- latin small letter a with acute,
|
|
||||||
U+00E1 ISOlat1 -->
|
|
||||||
<!ENTITY acirc "â"> <!-- latin small letter a with circumflex,
|
|
||||||
U+00E2 ISOlat1 -->
|
|
||||||
<!ENTITY atilde "ã"> <!-- latin small letter a with tilde,
|
|
||||||
U+00E3 ISOlat1 -->
|
|
||||||
<!ENTITY auml "ä"> <!-- latin small letter a with diaeresis,
|
|
||||||
U+00E4 ISOlat1 -->
|
|
||||||
<!ENTITY aring "å"> <!-- latin small letter a with ring above
|
|
||||||
= latin small letter a ring,
|
|
||||||
U+00E5 ISOlat1 -->
|
|
||||||
<!ENTITY aelig "æ"> <!-- latin small letter ae
|
|
||||||
= latin small ligature ae, U+00E6 ISOlat1 -->
|
|
||||||
<!ENTITY ccedil "ç"> <!-- latin small letter c with cedilla,
|
|
||||||
U+00E7 ISOlat1 -->
|
|
||||||
<!ENTITY egrave "è"> <!-- latin small letter e with grave,
|
|
||||||
U+00E8 ISOlat1 -->
|
|
||||||
<!ENTITY eacute "é"> <!-- latin small letter e with acute,
|
|
||||||
U+00E9 ISOlat1 -->
|
|
||||||
<!ENTITY ecirc "ê"> <!-- latin small letter e with circumflex,
|
|
||||||
U+00EA ISOlat1 -->
|
|
||||||
<!ENTITY euml "ë"> <!-- latin small letter e with diaeresis,
|
|
||||||
U+00EB ISOlat1 -->
|
|
||||||
<!ENTITY igrave "ì"> <!-- latin small letter i with grave,
|
|
||||||
U+00EC ISOlat1 -->
|
|
||||||
<!ENTITY iacute "í"> <!-- latin small letter i with acute,
|
|
||||||
U+00ED ISOlat1 -->
|
|
||||||
<!ENTITY icirc "î"> <!-- latin small letter i with circumflex,
|
|
||||||
U+00EE ISOlat1 -->
|
|
||||||
<!ENTITY iuml "ï"> <!-- latin small letter i with diaeresis,
|
|
||||||
U+00EF ISOlat1 -->
|
|
||||||
<!ENTITY eth "ð"> <!-- latin small letter eth, U+00F0 ISOlat1 -->
|
|
||||||
<!ENTITY ntilde "ñ"> <!-- latin small letter n with tilde,
|
|
||||||
U+00F1 ISOlat1 -->
|
|
||||||
<!ENTITY ograve "ò"> <!-- latin small letter o with grave,
|
|
||||||
U+00F2 ISOlat1 -->
|
|
||||||
<!ENTITY oacute "ó"> <!-- latin small letter o with acute,
|
|
||||||
U+00F3 ISOlat1 -->
|
|
||||||
<!ENTITY ocirc "ô"> <!-- latin small letter o with circumflex,
|
|
||||||
U+00F4 ISOlat1 -->
|
|
||||||
<!ENTITY otilde "õ"> <!-- latin small letter o with tilde,
|
|
||||||
U+00F5 ISOlat1 -->
|
|
||||||
<!ENTITY ouml "ö"> <!-- latin small letter o with diaeresis,
|
|
||||||
U+00F6 ISOlat1 -->
|
|
||||||
<!ENTITY divide "÷"> <!-- division sign, U+00F7 ISOnum -->
|
|
||||||
<!ENTITY oslash "ø"> <!-- latin small letter o with stroke,
|
|
||||||
= latin small letter o slash,
|
|
||||||
U+00F8 ISOlat1 -->
|
|
||||||
<!ENTITY ugrave "ù"> <!-- latin small letter u with grave,
|
|
||||||
U+00F9 ISOlat1 -->
|
|
||||||
<!ENTITY uacute "ú"> <!-- latin small letter u with acute,
|
|
||||||
U+00FA ISOlat1 -->
|
|
||||||
<!ENTITY ucirc "û"> <!-- latin small letter u with circumflex,
|
|
||||||
U+00FB ISOlat1 -->
|
|
||||||
<!ENTITY uuml "ü"> <!-- latin small letter u with diaeresis,
|
|
||||||
U+00FC ISOlat1 -->
|
|
||||||
<!ENTITY yacute "ý"> <!-- latin small letter y with acute,
|
|
||||||
U+00FD ISOlat1 -->
|
|
||||||
<!ENTITY thorn "þ"> <!-- latin small letter thorn,
|
|
||||||
U+00FE ISOlat1 -->
|
|
||||||
<!ENTITY yuml "ÿ"> <!-- latin small letter y with diaeresis,
|
|
||||||
U+00FF ISOlat1 -->
|
|
|
@ -1,80 +0,0 @@
|
||||||
<!-- Special characters for XHTML -->
|
|
||||||
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % HTMLspecial PUBLIC
|
|
||||||
"-//W3C//ENTITIES Special for XHTML//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
|
|
||||||
%HTMLspecial;
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Portions (C) International Organization for Standardization 1986:
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Relevant ISO entity set is given unless names are newly introduced.
|
|
||||||
New names (i.e., not in ISO 8879 list) do not clash with any
|
|
||||||
existing ISO 8879 entity names. ISO 10646 character numbers
|
|
||||||
are given for each character, in hex. values are decimal
|
|
||||||
conversions of the ISO 10646 values and refer to the document
|
|
||||||
character set. Names are Unicode names.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- C0 Controls and Basic Latin -->
|
|
||||||
<!ENTITY quot """> <!-- quotation mark, U+0022 ISOnum -->
|
|
||||||
<!ENTITY amp "&#38;"> <!-- ampersand, U+0026 ISOnum -->
|
|
||||||
<!ENTITY lt "&#60;"> <!-- less-than sign, U+003C ISOnum -->
|
|
||||||
<!ENTITY gt ">"> <!-- greater-than sign, U+003E ISOnum -->
|
|
||||||
<!ENTITY apos "'"> <!-- apostrophe = APL quote, U+0027 ISOnum -->
|
|
||||||
|
|
||||||
<!-- Latin Extended-A -->
|
|
||||||
<!ENTITY OElig "Œ"> <!-- latin capital ligature OE,
|
|
||||||
U+0152 ISOlat2 -->
|
|
||||||
<!ENTITY oelig "œ"> <!-- latin small ligature oe, U+0153 ISOlat2 -->
|
|
||||||
<!-- ligature is a misnomer, this is a separate character in some languages -->
|
|
||||||
<!ENTITY Scaron "Š"> <!-- latin capital letter S with caron,
|
|
||||||
U+0160 ISOlat2 -->
|
|
||||||
<!ENTITY scaron "š"> <!-- latin small letter s with caron,
|
|
||||||
U+0161 ISOlat2 -->
|
|
||||||
<!ENTITY Yuml "Ÿ"> <!-- latin capital letter Y with diaeresis,
|
|
||||||
U+0178 ISOlat2 -->
|
|
||||||
|
|
||||||
<!-- Spacing Modifier Letters -->
|
|
||||||
<!ENTITY circ "ˆ"> <!-- modifier letter circumflex accent,
|
|
||||||
U+02C6 ISOpub -->
|
|
||||||
<!ENTITY tilde "˜"> <!-- small tilde, U+02DC ISOdia -->
|
|
||||||
|
|
||||||
<!-- General Punctuation -->
|
|
||||||
<!ENTITY ensp " "> <!-- en space, U+2002 ISOpub -->
|
|
||||||
<!ENTITY emsp " "> <!-- em space, U+2003 ISOpub -->
|
|
||||||
<!ENTITY thinsp " "> <!-- thin space, U+2009 ISOpub -->
|
|
||||||
<!ENTITY zwnj "‌"> <!-- zero width non-joiner,
|
|
||||||
U+200C NEW RFC 2070 -->
|
|
||||||
<!ENTITY zwj "‍"> <!-- zero width joiner, U+200D NEW RFC 2070 -->
|
|
||||||
<!ENTITY lrm "‎"> <!-- left-to-right mark, U+200E NEW RFC 2070 -->
|
|
||||||
<!ENTITY rlm "‏"> <!-- right-to-left mark, U+200F NEW RFC 2070 -->
|
|
||||||
<!ENTITY ndash "–"> <!-- en dash, U+2013 ISOpub -->
|
|
||||||
<!ENTITY mdash "—"> <!-- em dash, U+2014 ISOpub -->
|
|
||||||
<!ENTITY lsquo "‘"> <!-- left single quotation mark,
|
|
||||||
U+2018 ISOnum -->
|
|
||||||
<!ENTITY rsquo "’"> <!-- right single quotation mark,
|
|
||||||
U+2019 ISOnum -->
|
|
||||||
<!ENTITY sbquo "‚"> <!-- single low-9 quotation mark, U+201A NEW -->
|
|
||||||
<!ENTITY ldquo "“"> <!-- left double quotation mark,
|
|
||||||
U+201C ISOnum -->
|
|
||||||
<!ENTITY rdquo "”"> <!-- right double quotation mark,
|
|
||||||
U+201D ISOnum -->
|
|
||||||
<!ENTITY bdquo "„"> <!-- double low-9 quotation mark, U+201E NEW -->
|
|
||||||
<!ENTITY dagger "†"> <!-- dagger, U+2020 ISOpub -->
|
|
||||||
<!ENTITY Dagger "‡"> <!-- double dagger, U+2021 ISOpub -->
|
|
||||||
<!ENTITY permil "‰"> <!-- per mille sign, U+2030 ISOtech -->
|
|
||||||
<!ENTITY lsaquo "‹"> <!-- single left-pointing angle quotation mark,
|
|
||||||
U+2039 ISO proposed -->
|
|
||||||
<!-- lsaquo is proposed but not yet ISO standardized -->
|
|
||||||
<!ENTITY rsaquo "›"> <!-- single right-pointing angle quotation mark,
|
|
||||||
U+203A ISO proposed -->
|
|
||||||
<!-- rsaquo is proposed but not yet ISO standardized -->
|
|
||||||
|
|
||||||
<!-- Currency Symbols -->
|
|
||||||
<!ENTITY euro "€"> <!-- euro sign, U+20AC NEW -->
|
|
|
@ -1,237 +0,0 @@
|
||||||
<!-- Mathematical, Greek and Symbolic characters for XHTML -->
|
|
||||||
|
|
||||||
<!-- Character entity set. Typical invocation:
|
|
||||||
<!ENTITY % HTMLsymbol PUBLIC
|
|
||||||
"-//W3C//ENTITIES Symbols for XHTML//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
|
|
||||||
%HTMLsymbol;
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Portions (C) International Organization for Standardization 1986:
|
|
||||||
Permission to copy in any form is granted for use with
|
|
||||||
conforming SGML systems and applications as defined in
|
|
||||||
ISO 8879, provided this notice is included in all copies.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Relevant ISO entity set is given unless names are newly introduced.
|
|
||||||
New names (i.e., not in ISO 8879 list) do not clash with any
|
|
||||||
existing ISO 8879 entity names. ISO 10646 character numbers
|
|
||||||
are given for each character, in hex. values are decimal
|
|
||||||
conversions of the ISO 10646 values and refer to the document
|
|
||||||
character set. Names are Unicode names.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Latin Extended-B -->
|
|
||||||
<!ENTITY fnof "ƒ"> <!-- latin small letter f with hook = function
|
|
||||||
= florin, U+0192 ISOtech -->
|
|
||||||
|
|
||||||
<!-- Greek -->
|
|
||||||
<!ENTITY Alpha "Α"> <!-- greek capital letter alpha, U+0391 -->
|
|
||||||
<!ENTITY Beta "Β"> <!-- greek capital letter beta, U+0392 -->
|
|
||||||
<!ENTITY Gamma "Γ"> <!-- greek capital letter gamma,
|
|
||||||
U+0393 ISOgrk3 -->
|
|
||||||
<!ENTITY Delta "Δ"> <!-- greek capital letter delta,
|
|
||||||
U+0394 ISOgrk3 -->
|
|
||||||
<!ENTITY Epsilon "Ε"> <!-- greek capital letter epsilon, U+0395 -->
|
|
||||||
<!ENTITY Zeta "Ζ"> <!-- greek capital letter zeta, U+0396 -->
|
|
||||||
<!ENTITY Eta "Η"> <!-- greek capital letter eta, U+0397 -->
|
|
||||||
<!ENTITY Theta "Θ"> <!-- greek capital letter theta,
|
|
||||||
U+0398 ISOgrk3 -->
|
|
||||||
<!ENTITY Iota "Ι"> <!-- greek capital letter iota, U+0399 -->
|
|
||||||
<!ENTITY Kappa "Κ"> <!-- greek capital letter kappa, U+039A -->
|
|
||||||
<!ENTITY Lambda "Λ"> <!-- greek capital letter lamda,
|
|
||||||
U+039B ISOgrk3 -->
|
|
||||||
<!ENTITY Mu "Μ"> <!-- greek capital letter mu, U+039C -->
|
|
||||||
<!ENTITY Nu "Ν"> <!-- greek capital letter nu, U+039D -->
|
|
||||||
<!ENTITY Xi "Ξ"> <!-- greek capital letter xi, U+039E ISOgrk3 -->
|
|
||||||
<!ENTITY Omicron "Ο"> <!-- greek capital letter omicron, U+039F -->
|
|
||||||
<!ENTITY Pi "Π"> <!-- greek capital letter pi, U+03A0 ISOgrk3 -->
|
|
||||||
<!ENTITY Rho "Ρ"> <!-- greek capital letter rho, U+03A1 -->
|
|
||||||
<!-- there is no Sigmaf, and no U+03A2 character either -->
|
|
||||||
<!ENTITY Sigma "Σ"> <!-- greek capital letter sigma,
|
|
||||||
U+03A3 ISOgrk3 -->
|
|
||||||
<!ENTITY Tau "Τ"> <!-- greek capital letter tau, U+03A4 -->
|
|
||||||
<!ENTITY Upsilon "Υ"> <!-- greek capital letter upsilon,
|
|
||||||
U+03A5 ISOgrk3 -->
|
|
||||||
<!ENTITY Phi "Φ"> <!-- greek capital letter phi,
|
|
||||||
U+03A6 ISOgrk3 -->
|
|
||||||
<!ENTITY Chi "Χ"> <!-- greek capital letter chi, U+03A7 -->
|
|
||||||
<!ENTITY Psi "Ψ"> <!-- greek capital letter psi,
|
|
||||||
U+03A8 ISOgrk3 -->
|
|
||||||
<!ENTITY Omega "Ω"> <!-- greek capital letter omega,
|
|
||||||
U+03A9 ISOgrk3 -->
|
|
||||||
|
|
||||||
<!ENTITY alpha "α"> <!-- greek small letter alpha,
|
|
||||||
U+03B1 ISOgrk3 -->
|
|
||||||
<!ENTITY beta "β"> <!-- greek small letter beta, U+03B2 ISOgrk3 -->
|
|
||||||
<!ENTITY gamma "γ"> <!-- greek small letter gamma,
|
|
||||||
U+03B3 ISOgrk3 -->
|
|
||||||
<!ENTITY delta "δ"> <!-- greek small letter delta,
|
|
||||||
U+03B4 ISOgrk3 -->
|
|
||||||
<!ENTITY epsilon "ε"> <!-- greek small letter epsilon,
|
|
||||||
U+03B5 ISOgrk3 -->
|
|
||||||
<!ENTITY zeta "ζ"> <!-- greek small letter zeta, U+03B6 ISOgrk3 -->
|
|
||||||
<!ENTITY eta "η"> <!-- greek small letter eta, U+03B7 ISOgrk3 -->
|
|
||||||
<!ENTITY theta "θ"> <!-- greek small letter theta,
|
|
||||||
U+03B8 ISOgrk3 -->
|
|
||||||
<!ENTITY iota "ι"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->
|
|
||||||
<!ENTITY kappa "κ"> <!-- greek small letter kappa,
|
|
||||||
U+03BA ISOgrk3 -->
|
|
||||||
<!ENTITY lambda "λ"> <!-- greek small letter lamda,
|
|
||||||
U+03BB ISOgrk3 -->
|
|
||||||
<!ENTITY mu "μ"> <!-- greek small letter mu, U+03BC ISOgrk3 -->
|
|
||||||
<!ENTITY nu "ν"> <!-- greek small letter nu, U+03BD ISOgrk3 -->
|
|
||||||
<!ENTITY xi "ξ"> <!-- greek small letter xi, U+03BE ISOgrk3 -->
|
|
||||||
<!ENTITY omicron "ο"> <!-- greek small letter omicron, U+03BF NEW -->
|
|
||||||
<!ENTITY pi "π"> <!-- greek small letter pi, U+03C0 ISOgrk3 -->
|
|
||||||
<!ENTITY rho "ρ"> <!-- greek small letter rho, U+03C1 ISOgrk3 -->
|
|
||||||
<!ENTITY sigmaf "ς"> <!-- greek small letter final sigma,
|
|
||||||
U+03C2 ISOgrk3 -->
|
|
||||||
<!ENTITY sigma "σ"> <!-- greek small letter sigma,
|
|
||||||
U+03C3 ISOgrk3 -->
|
|
||||||
<!ENTITY tau "τ"> <!-- greek small letter tau, U+03C4 ISOgrk3 -->
|
|
||||||
<!ENTITY upsilon "υ"> <!-- greek small letter upsilon,
|
|
||||||
U+03C5 ISOgrk3 -->
|
|
||||||
<!ENTITY phi "φ"> <!-- greek small letter phi, U+03C6 ISOgrk3 -->
|
|
||||||
<!ENTITY chi "χ"> <!-- greek small letter chi, U+03C7 ISOgrk3 -->
|
|
||||||
<!ENTITY psi "ψ"> <!-- greek small letter psi, U+03C8 ISOgrk3 -->
|
|
||||||
<!ENTITY omega "ω"> <!-- greek small letter omega,
|
|
||||||
U+03C9 ISOgrk3 -->
|
|
||||||
<!ENTITY thetasym "ϑ"> <!-- greek theta symbol,
|
|
||||||
U+03D1 NEW -->
|
|
||||||
<!ENTITY upsih "ϒ"> <!-- greek upsilon with hook symbol,
|
|
||||||
U+03D2 NEW -->
|
|
||||||
<!ENTITY piv "ϖ"> <!-- greek pi symbol, U+03D6 ISOgrk3 -->
|
|
||||||
|
|
||||||
<!-- General Punctuation -->
|
|
||||||
<!ENTITY bull "•"> <!-- bullet = black small circle,
|
|
||||||
U+2022 ISOpub -->
|
|
||||||
<!-- bullet is NOT the same as bullet operator, U+2219 -->
|
|
||||||
<!ENTITY hellip "…"> <!-- horizontal ellipsis = three dot leader,
|
|
||||||
U+2026 ISOpub -->
|
|
||||||
<!ENTITY prime "′"> <!-- prime = minutes = feet, U+2032 ISOtech -->
|
|
||||||
<!ENTITY Prime "″"> <!-- double prime = seconds = inches,
|
|
||||||
U+2033 ISOtech -->
|
|
||||||
<!ENTITY oline "‾"> <!-- overline = spacing overscore,
|
|
||||||
U+203E NEW -->
|
|
||||||
<!ENTITY frasl "⁄"> <!-- fraction slash, U+2044 NEW -->
|
|
||||||
|
|
||||||
<!-- Letterlike Symbols -->
|
|
||||||
<!ENTITY weierp "℘"> <!-- script capital P = power set
|
|
||||||
= Weierstrass p, U+2118 ISOamso -->
|
|
||||||
<!ENTITY image "ℑ"> <!-- black-letter capital I = imaginary part,
|
|
||||||
U+2111 ISOamso -->
|
|
||||||
<!ENTITY real "ℜ"> <!-- black-letter capital R = real part symbol,
|
|
||||||
U+211C ISOamso -->
|
|
||||||
<!ENTITY trade "™"> <!-- trade mark sign, U+2122 ISOnum -->
|
|
||||||
<!ENTITY alefsym "ℵ"> <!-- alef symbol = first transfinite cardinal,
|
|
||||||
U+2135 NEW -->
|
|
||||||
<!-- alef symbol is NOT the same as hebrew letter alef,
|
|
||||||
U+05D0 although the same glyph could be used to depict both characters -->
|
|
||||||
|
|
||||||
<!-- Arrows -->
|
|
||||||
<!ENTITY larr "←"> <!-- leftwards arrow, U+2190 ISOnum -->
|
|
||||||
<!ENTITY uarr "↑"> <!-- upwards arrow, U+2191 ISOnum-->
|
|
||||||
<!ENTITY rarr "→"> <!-- rightwards arrow, U+2192 ISOnum -->
|
|
||||||
<!ENTITY darr "↓"> <!-- downwards arrow, U+2193 ISOnum -->
|
|
||||||
<!ENTITY harr "↔"> <!-- left right arrow, U+2194 ISOamsa -->
|
|
||||||
<!ENTITY crarr "↵"> <!-- downwards arrow with corner leftwards
|
|
||||||
= carriage return, U+21B5 NEW -->
|
|
||||||
<!ENTITY lArr "⇐"> <!-- leftwards double arrow, U+21D0 ISOtech -->
|
|
||||||
<!-- Unicode does not say that lArr is the same as the 'is implied by' arrow
|
|
||||||
but also does not have any other character for that function. So lArr can
|
|
||||||
be used for 'is implied by' as ISOtech suggests -->
|
|
||||||
<!ENTITY uArr "⇑"> <!-- upwards double arrow, U+21D1 ISOamsa -->
|
|
||||||
<!ENTITY rArr "⇒"> <!-- rightwards double arrow,
|
|
||||||
U+21D2 ISOtech -->
|
|
||||||
<!-- Unicode does not say this is the 'implies' character but does not have
|
|
||||||
another character with this function so rArr can be used for 'implies'
|
|
||||||
as ISOtech suggests -->
|
|
||||||
<!ENTITY dArr "⇓"> <!-- downwards double arrow, U+21D3 ISOamsa -->
|
|
||||||
<!ENTITY hArr "⇔"> <!-- left right double arrow,
|
|
||||||
U+21D4 ISOamsa -->
|
|
||||||
|
|
||||||
<!-- Mathematical Operators -->
|
|
||||||
<!ENTITY forall "∀"> <!-- for all, U+2200 ISOtech -->
|
|
||||||
<!ENTITY part "∂"> <!-- partial differential, U+2202 ISOtech -->
|
|
||||||
<!ENTITY exist "∃"> <!-- there exists, U+2203 ISOtech -->
|
|
||||||
<!ENTITY empty "∅"> <!-- empty set = null set, U+2205 ISOamso -->
|
|
||||||
<!ENTITY nabla "∇"> <!-- nabla = backward difference,
|
|
||||||
U+2207 ISOtech -->
|
|
||||||
<!ENTITY isin "∈"> <!-- element of, U+2208 ISOtech -->
|
|
||||||
<!ENTITY notin "∉"> <!-- not an element of, U+2209 ISOtech -->
|
|
||||||
<!ENTITY ni "∋"> <!-- contains as member, U+220B ISOtech -->
|
|
||||||
<!ENTITY prod "∏"> <!-- n-ary product = product sign,
|
|
||||||
U+220F ISOamsb -->
|
|
||||||
<!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though
|
|
||||||
the same glyph might be used for both -->
|
|
||||||
<!ENTITY sum "∑"> <!-- n-ary summation, U+2211 ISOamsb -->
|
|
||||||
<!-- sum is NOT the same character as U+03A3 'greek capital letter sigma'
|
|
||||||
though the same glyph might be used for both -->
|
|
||||||
<!ENTITY minus "−"> <!-- minus sign, U+2212 ISOtech -->
|
|
||||||
<!ENTITY lowast "∗"> <!-- asterisk operator, U+2217 ISOtech -->
|
|
||||||
<!ENTITY radic "√"> <!-- square root = radical sign,
|
|
||||||
U+221A ISOtech -->
|
|
||||||
<!ENTITY prop "∝"> <!-- proportional to, U+221D ISOtech -->
|
|
||||||
<!ENTITY infin "∞"> <!-- infinity, U+221E ISOtech -->
|
|
||||||
<!ENTITY ang "∠"> <!-- angle, U+2220 ISOamso -->
|
|
||||||
<!ENTITY and "∧"> <!-- logical and = wedge, U+2227 ISOtech -->
|
|
||||||
<!ENTITY or "∨"> <!-- logical or = vee, U+2228 ISOtech -->
|
|
||||||
<!ENTITY cap "∩"> <!-- intersection = cap, U+2229 ISOtech -->
|
|
||||||
<!ENTITY cup "∪"> <!-- union = cup, U+222A ISOtech -->
|
|
||||||
<!ENTITY int "∫"> <!-- integral, U+222B ISOtech -->
|
|
||||||
<!ENTITY there4 "∴"> <!-- therefore, U+2234 ISOtech -->
|
|
||||||
<!ENTITY sim "∼"> <!-- tilde operator = varies with = similar to,
|
|
||||||
U+223C ISOtech -->
|
|
||||||
<!-- tilde operator is NOT the same character as the tilde, U+007E,
|
|
||||||
although the same glyph might be used to represent both -->
|
|
||||||
<!ENTITY cong "≅"> <!-- approximately equal to, U+2245 ISOtech -->
|
|
||||||
<!ENTITY asymp "≈"> <!-- almost equal to = asymptotic to,
|
|
||||||
U+2248 ISOamsr -->
|
|
||||||
<!ENTITY ne "≠"> <!-- not equal to, U+2260 ISOtech -->
|
|
||||||
<!ENTITY equiv "≡"> <!-- identical to, U+2261 ISOtech -->
|
|
||||||
<!ENTITY le "≤"> <!-- less-than or equal to, U+2264 ISOtech -->
|
|
||||||
<!ENTITY ge "≥"> <!-- greater-than or equal to,
|
|
||||||
U+2265 ISOtech -->
|
|
||||||
<!ENTITY sub "⊂"> <!-- subset of, U+2282 ISOtech -->
|
|
||||||
<!ENTITY sup "⊃"> <!-- superset of, U+2283 ISOtech -->
|
|
||||||
<!ENTITY nsub "⊄"> <!-- not a subset of, U+2284 ISOamsn -->
|
|
||||||
<!ENTITY sube "⊆"> <!-- subset of or equal to, U+2286 ISOtech -->
|
|
||||||
<!ENTITY supe "⊇"> <!-- superset of or equal to,
|
|
||||||
U+2287 ISOtech -->
|
|
||||||
<!ENTITY oplus "⊕"> <!-- circled plus = direct sum,
|
|
||||||
U+2295 ISOamsb -->
|
|
||||||
<!ENTITY otimes "⊗"> <!-- circled times = vector product,
|
|
||||||
U+2297 ISOamsb -->
|
|
||||||
<!ENTITY perp "⊥"> <!-- up tack = orthogonal to = perpendicular,
|
|
||||||
U+22A5 ISOtech -->
|
|
||||||
<!ENTITY sdot "⋅"> <!-- dot operator, U+22C5 ISOamsb -->
|
|
||||||
<!-- dot operator is NOT the same character as U+00B7 middle dot -->
|
|
||||||
|
|
||||||
<!-- Miscellaneous Technical -->
|
|
||||||
<!ENTITY lceil "⌈"> <!-- left ceiling = APL upstile,
|
|
||||||
U+2308 ISOamsc -->
|
|
||||||
<!ENTITY rceil "⌉"> <!-- right ceiling, U+2309 ISOamsc -->
|
|
||||||
<!ENTITY lfloor "⌊"> <!-- left floor = APL downstile,
|
|
||||||
U+230A ISOamsc -->
|
|
||||||
<!ENTITY rfloor "⌋"> <!-- right floor, U+230B ISOamsc -->
|
|
||||||
<!ENTITY lang "〈"> <!-- left-pointing angle bracket = bra,
|
|
||||||
U+2329 ISOtech -->
|
|
||||||
<!-- lang is NOT the same character as U+003C 'less than sign'
|
|
||||||
or U+2039 'single left-pointing angle quotation mark' -->
|
|
||||||
<!ENTITY rang "〉"> <!-- right-pointing angle bracket = ket,
|
|
||||||
U+232A ISOtech -->
|
|
||||||
<!-- rang is NOT the same character as U+003E 'greater than sign'
|
|
||||||
or U+203A 'single right-pointing angle quotation mark' -->
|
|
||||||
|
|
||||||
<!-- Geometric Shapes -->
|
|
||||||
<!ENTITY loz "◊"> <!-- lozenge, U+25CA ISOpub -->
|
|
||||||
|
|
||||||
<!-- Miscellaneous Symbols -->
|
|
||||||
<!ENTITY spades "♠"> <!-- black spade suit, U+2660 ISOpub -->
|
|
||||||
<!-- black here seems to mean filled as opposed to hollow -->
|
|
||||||
<!ENTITY clubs "♣"> <!-- black club suit = shamrock,
|
|
||||||
U+2663 ISOpub -->
|
|
||||||
<!ENTITY hearts "♥"> <!-- black heart suit = valentine,
|
|
||||||
U+2665 ISOpub -->
|
|
||||||
<!ENTITY diams "♦"> <!-- black diamond suit, U+2666 ISOpub -->
|
|
|
@ -1,23 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
// This file demonstrates basic usage of HTMLPurifier.
|
|
||||||
|
|
||||||
// replace this with the path to the HTML Purifier library
|
|
||||||
require_once '../../library/HTMLPurifier.auto.php';
|
|
||||||
|
|
||||||
$config = HTMLPurifier_Config::createDefault();
|
|
||||||
|
|
||||||
// configuration goes here:
|
|
||||||
$config->set('Core.Encoding', 'UTF-8'); // replace with your encoding
|
|
||||||
$config->set('HTML.Doctype', 'XHTML 1.0 Transitional'); // replace with your doctype
|
|
||||||
|
|
||||||
$purifier = new HTMLPurifier($config);
|
|
||||||
|
|
||||||
// untrusted input HTML
|
|
||||||
$html = '<b>Simple and short';
|
|
||||||
|
|
||||||
$pure_html = $purifier->purify($html);
|
|
||||||
|
|
||||||
echo '<pre>' . htmlspecialchars($pure_html) . '</pre>';
|
|
||||||
|
|
||||||
// vim: et sw=4 sts=4
|
|
|
@ -1,9 +0,0 @@
|
||||||
<public:attach event="oncontentready" onevent="init();" />
|
|
||||||
<script>
|
|
||||||
function init() {
|
|
||||||
element.innerHTML = '“'+element.innerHTML+'”';
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
188
vendor/ezyang/htmlpurifier/docs/index.html
vendored
|
@ -1,188 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<meta name="description" content="Index to all HTML Purifier documentation." />
|
|
||||||
<link rel="stylesheet" type="text/css" href="./style.css" />
|
|
||||||
|
|
||||||
<title>Documentation - HTML Purifier</title>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>Documentation</h1>
|
|
||||||
|
|
||||||
<p><strong><a href="http://htmlpurifier.org/">HTML Purifier</a></strong> has documentation for all types of people.
|
|
||||||
Here is an index of all of them.</p>
|
|
||||||
|
|
||||||
<h2>End-user</h2>
|
|
||||||
<p>End-user documentation that contains articles, tutorials and useful
|
|
||||||
information for casual developers using HTML Purifier.</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
<dt><a href="enduser-id.html">IDs</a></dt>
|
|
||||||
<dd>Explains various methods for allowing IDs in documents safely.</dd>
|
|
||||||
|
|
||||||
<dt><a href="enduser-youtube.html">Embedding YouTube videos</a></dt>
|
|
||||||
<dd>Explains how to safely allow the embedding of flash from trusted sites.</dd>
|
|
||||||
|
|
||||||
<dt><a href="enduser-slow.html">Speeding up HTML Purifier</a></dt>
|
|
||||||
<dd>Explains how to speed up HTML Purifier through caching or inbound filtering.</dd>
|
|
||||||
|
|
||||||
<dt><a href="enduser-utf8.html">UTF-8: The Secret of Character Encoding</a></dt>
|
|
||||||
<dd>Describes the rationale for using UTF-8, the ramifications otherwise, and how to make the switch.</dd>
|
|
||||||
|
|
||||||
<dt><a href="enduser-tidy.html">Tidy</a></dt>
|
|
||||||
<dd>Tutorial for tweaking HTML Purifier's Tidy-like behavior.</dd>
|
|
||||||
|
|
||||||
<dt><a href="enduser-customize.html">Customize</a></dt>
|
|
||||||
<dd>Tutorial for customizing HTML Purifier's tag and attribute sets.</dd>
|
|
||||||
|
|
||||||
<dt><a href="enduser-uri-filter.html">URI Filters</a></dt>
|
|
||||||
<dd>Tutorial for creating custom URI filters.</dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<h2>Development</h2>
|
|
||||||
<p>Developer documentation detailing code issues, roadmaps and project
|
|
||||||
conventions.</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
<dt><a href="dev-progress.html">Implementation Progress</a></dt>
|
|
||||||
<dd>Tables detailing HTML element and CSS property implementation coverage.</dd>
|
|
||||||
|
|
||||||
<dt><a href="dev-naming.html">Naming Conventions</a></dt>
|
|
||||||
<dd>Defines class naming conventions.</dd>
|
|
||||||
|
|
||||||
<dt><a href="dev-optimization.html">Optimization</a></dt>
|
|
||||||
<dd>Discusses possible methods of optimizing HTML Purifier.</dd>
|
|
||||||
|
|
||||||
<dt><a href="dev-flush.html">Flushing the Purifier</a></dt>
|
|
||||||
<dd>Discusses when to flush HTML Purifier's various caches.</dd>
|
|
||||||
|
|
||||||
<dt><a href="dev-advanced-api.html">Advanced API</a></dt>
|
|
||||||
<dd>Specification for HTML Purifier's advanced API for defining
|
|
||||||
custom filtering behavior.</dd>
|
|
||||||
|
|
||||||
<dt><a href="dev-config-schema.html">Config Schema</a></dt>
|
|
||||||
<dd>Describes config schema framework in HTML Purifier.</dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<h2>Proposals</h2>
|
|
||||||
<p>Proposed features, as well as the associated rambling to get a clear
|
|
||||||
objective in place before attempted implementation.</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt><a href="proposal-colors.html">Colors</a></dt>
|
|
||||||
<dd>Proposal to allow for color constraints.</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<h2>Reference</h2>
|
|
||||||
<p>Miscellaneous essays, research pieces and other reference type material
|
|
||||||
that may not directly discuss HTML Purifier.</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt><a href="ref-devnetwork.html">DevNetwork Credits</a></dt>
|
|
||||||
<dd>Credits and links to DevNetwork forum topics.</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<h2>Internal memos</h2>
|
|
||||||
|
|
||||||
<p>Plaintext documents that are more for use by active developers of
|
|
||||||
the code. They may be upgraded to HTML files or stay as TXT scratchpads.</p>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
|
|
||||||
<thead><tr>
|
|
||||||
<th style="width:10%">Type</th>
|
|
||||||
<th style="width:20%">Name</th>
|
|
||||||
<th>Description</th>
|
|
||||||
</tr></thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>End-user</td>
|
|
||||||
<td><a href="enduser-overview.txt">Overview</a></td>
|
|
||||||
<td>High level overview of the general control flow (mostly obsolete).</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>End-user</td>
|
|
||||||
<td><a href="enduser-security.txt">Security</a></td>
|
|
||||||
<td>Common security issues that may still arise (half-baked).</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>Development</td>
|
|
||||||
<td><a href="dev-config-bcbreaks.txt">Config BC Breaks</a></td>
|
|
||||||
<td>Backwards-incompatible changes in HTML Purifier 4.0.0</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>Development</td>
|
|
||||||
<td><a href="dev-code-quality.txt">Code Quality Issues</a></td>
|
|
||||||
<td>Enumerates code quality issues and places that need to be refactored.</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>Proposal</td>
|
|
||||||
<td><a href="proposal-filter-levels.txt">Filter levels</a></td>
|
|
||||||
<td>Outlines details of projected configurable level of filtering.</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>Proposal</td>
|
|
||||||
<td><a href="proposal-language.txt">Language</a></td>
|
|
||||||
<td>Specification of I18N for error messages derived from MediaWiki (half-baked).</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>Proposal</td>
|
|
||||||
<td><a href="proposal-new-directives.txt">New directives</a></td>
|
|
||||||
<td>Assorted configuration options that could be implemented.</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>Proposal</td>
|
|
||||||
<td><a href="proposal-css-extraction.txt">CSS extraction</a></td>
|
|
||||||
<td>Taking the inline CSS out of documents and into <code>style</code>.</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>Reference</td>
|
|
||||||
<td><a href="ref-content-models.txt">Handling Content Model Changes</a></td>
|
|
||||||
<td>Discusses how to tidy up content model changes using custom ChildDef classes.</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>Reference</td>
|
|
||||||
<td><a href="ref-proprietary-tags.txt">Proprietary tags</a></td>
|
|
||||||
<td>List of vendor-specific tags we may want to transform to W3C compliant markup.</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>Reference</td>
|
|
||||||
<td><a href="ref-html-modularization.txt">Modularization of HTMLDefinition</a></td>
|
|
||||||
<td>Provides a high-level overview of the concepts behind HTMLModules.</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>Reference</td>
|
|
||||||
<td><a href="ref-whatwg.txt">WHATWG</a></td>
|
|
||||||
<td>How WHATWG plays into what we need to do.</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
|
@ -1,49 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<meta name="description" content="Proposal to allow for color constraints in HTML Purifier." />
|
|
||||||
<link rel="stylesheet" type="text/css" href="./style.css" />
|
|
||||||
|
|
||||||
<title>Proposal: Colors - HTML Purifier</title>
|
|
||||||
|
|
||||||
</head><body>
|
|
||||||
|
|
||||||
<h1 class="subtitled">Colors</h1>
|
|
||||||
<div class="subtitle">Hammering some sense into those color-blind newbies</div>
|
|
||||||
|
|
||||||
<div id="filing">Filed under Proposals</div>
|
|
||||||
<div id="index">Return to the <a href="index.html">index</a>.</div>
|
|
||||||
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>
|
|
||||||
|
|
||||||
<p>Your website probably has a color-scheme.
|
|
||||||
<span style="color:#090; background:#FFF;">Green on white</span>,
|
|
||||||
<span style="color:#A0F; background:#FF0;">purple on yellow</span>,
|
|
||||||
whatever. When you give users the ability to style their content, you may
|
|
||||||
want them to keep in line with your styling. If you're website is all
|
|
||||||
about light colors, you don't want a user to come in and vandalize your
|
|
||||||
page with a deep maroon.</p>
|
|
||||||
|
|
||||||
<p>This is an extremely silly feature proposal, but I'm writing it down anyway.</p>
|
|
||||||
|
|
||||||
<p>What if the user could constrain the colors specified in inline styles? You
|
|
||||||
are only allowed to use these shades of dark green for text and these shades
|
|
||||||
of light yellow for the background. At the very least, you could ensure
|
|
||||||
that we did not have pale yellow on white text.</p>
|
|
||||||
|
|
||||||
<h2>Implementation issues</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>Requires the color attribute definition to know, currently, what the text
|
|
||||||
and background colors are. This becomes difficult when classes are thrown
|
|
||||||
into the mix.</li>
|
|
||||||
<li>The user still has to define the permissible colors, how does one do
|
|
||||||
something like that?</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
<!-- vim: et sw=4 sts=4
|
|
||||||
-->
|
|
|
@ -1,23 +0,0 @@
|
||||||
|
|
||||||
Configuration
|
|
||||||
|
|
||||||
Configuration is documented on a per-use case: if a class uses a certain
|
|
||||||
value from the configuration object, it has to define its name and what the
|
|
||||||
value is used for. This means decentralized configuration declarations that
|
|
||||||
are nevertheless error checking and a centralized configuration object.
|
|
||||||
|
|
||||||
Directives are divided into namespaces, indicating the major portion of
|
|
||||||
functionality they cover (although there may be overlaps). Please consult
|
|
||||||
the documentation in ConfigDef for more information on these namespaces.
|
|
||||||
|
|
||||||
Since configuration is dependant on context, internal classes require a
|
|
||||||
configuration object to be passed as a parameter. (They also require a
|
|
||||||
Context object). A majority of classes do not need the config object,
|
|
||||||
but for those who do, it is a lifesaver.
|
|
||||||
|
|
||||||
Definition objects are complex datatypes influenced by their respective
|
|
||||||
directive namespaces (HTMLDefinition with HTML and CSSDefinition with CSS).
|
|
||||||
If any of these directives is updated, HTML Purifier forces the definition
|
|
||||||
to be regenerated.
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
|
@ -1,34 +0,0 @@
|
||||||
|
|
||||||
Extracting inline CSS from HTML Purifier
|
|
||||||
voodoofied: Assigning semantics to elements
|
|
||||||
|
|
||||||
Sander Tekelenburg brought to my attention the poor programming style of
|
|
||||||
inline CSS in HTML documents. In an ideal world, we wouldn't be using inline
|
|
||||||
CSS at all: everything would be assigned using semantic class attributes
|
|
||||||
from an external stylesheet.
|
|
||||||
|
|
||||||
With ExtractStyleBlocks and CSSTidy, this is now possible (when allowed, users
|
|
||||||
can specify a style element which gets extracted from the user-submitted HTML, which
|
|
||||||
the application can place in the head of the HTML document). But there still
|
|
||||||
is the issue of inline CSS that refuses to go away.
|
|
||||||
|
|
||||||
The basic idea behind this feature is assign every element a unique identifier,
|
|
||||||
and then move all of the CSS data to a style-sheet. This HTML:
|
|
||||||
|
|
||||||
<div style="text-align:center">Big <span style="color:red;">things</span>!</div>
|
|
||||||
|
|
||||||
into
|
|
||||||
|
|
||||||
<div id="hp-12345">Big <span id="hp-12346">things</span>!</div>
|
|
||||||
|
|
||||||
and a stylesheet that is:
|
|
||||||
|
|
||||||
#hp-12345 {text-align:center;}
|
|
||||||
#hp-12346 {color:red;}
|
|
||||||
|
|
||||||
Beyond that, HTML Purifier can magically merge common CSS values together,
|
|
||||||
and a whole manner of other heuristic things. HTML Purifier should also
|
|
||||||
make it easy for an admin to re-style the HTML semantically. Speed is not
|
|
||||||
an issue. Also, better WYSIWYG editors are needed.
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
211
vendor/ezyang/htmlpurifier/docs/proposal-errors.txt
vendored
|
@ -1,211 +0,0 @@
|
||||||
Considerations for ErrorCollection
|
|
||||||
|
|
||||||
Presently, HTML Purifier takes a code-execution centric approach to handling
|
|
||||||
errors. Errors are organized and grouped according to which segment of the
|
|
||||||
code triggers them, not necessarily the portion of the input document that
|
|
||||||
triggered the error. This means that errors are pseudo-sorted by category,
|
|
||||||
rather than location in the document.
|
|
||||||
|
|
||||||
One easy way to "fix" this problem would be to re-sort according to line number.
|
|
||||||
However, the "category" style information we derive from naively following
|
|
||||||
program execution is still useful. After all, each of the strategies which
|
|
||||||
can report errors still process the document mostly linearly. Furthermore,
|
|
||||||
not only do they process linearly, but the way they pass off operations to
|
|
||||||
sub-systems mirrors that of the document. For example, AttrValidator will
|
|
||||||
linearly proceed through elements, and on each element will use AttrDef to
|
|
||||||
validate those contents. From there, the attribute might have more
|
|
||||||
sub-components, which have execution passed off accordingly.
|
|
||||||
|
|
||||||
In fact, each strategy handles a very specific class of "error."
|
|
||||||
|
|
||||||
RemoveForeignElements - element tokens
|
|
||||||
MakeWellFormed - element token ordering
|
|
||||||
FixNesting - element token ordering
|
|
||||||
ValidateAttributes - attributes of elements
|
|
||||||
|
|
||||||
The crucial point is that while we care about the hierarchy governing these
|
|
||||||
different errors, we *don't* care about any other information about what actually
|
|
||||||
happens to the elements. This brings up another point: if HTML Purifier fixes
|
|
||||||
something, this is not really a notice/warning/error; it's really a suggestion
|
|
||||||
of a way to fix the aforementioned defects.
|
|
||||||
|
|
||||||
In short, the refactoring to take this into account kinda sucks.
|
|
||||||
|
|
||||||
Errors should not be recorded in order that they are reported. Instead, they
|
|
||||||
should be bound to the line (and preferably element) in which they were found.
|
|
||||||
This means we need some way to uniquely identify every element in the document,
|
|
||||||
which doesn't presently exist. An easy way of adding this would be to track
|
|
||||||
line columns. An important ramification of this is that we *must* use the
|
|
||||||
DirectLex implementation.
|
|
||||||
|
|
||||||
1. Implement column numbers for DirectLex [DONE!]
|
|
||||||
2. Disable error collection when not using DirectLex [DONE!]
|
|
||||||
|
|
||||||
Next, we need to re-orient all of the error declarations to place CurrentToken
|
|
||||||
at utmost important. Since this is passed via Context, it's not always clear
|
|
||||||
if that's available. ErrorCollector should complain HARD if it isn't available.
|
|
||||||
There are some locations when we don't have a token available. These include:
|
|
||||||
|
|
||||||
* Lexing - this can actually have a row and column, but NOT correspond to
|
|
||||||
a token
|
|
||||||
* End of document errors - bump this to the end
|
|
||||||
|
|
||||||
Actually, we *don't* have to complain if CurrentToken isn't available; we just
|
|
||||||
set it as a document-wide error. And actually, nothing needs to be done here.
|
|
||||||
|
|
||||||
Something interesting to consider is whether or not we care about the locations
|
|
||||||
of attributes and CSS properties, i.e. the sub-objects that compose these things.
|
|
||||||
In terms of consistency, at the very least attributes should have column/line
|
|
||||||
numbers attached to them. However, this may be overkill, as attributes are
|
|
||||||
uniquely identifiable. You could go even further, with CSS, but they are also
|
|
||||||
uniquely identifiable.
|
|
||||||
|
|
||||||
Bottom-line is, however, this information must be available, in form of the
|
|
||||||
CurrentAttribute and CurrentCssProperty (theoretical) context variables, and
|
|
||||||
it must be used to organize the errors that the sub-processes may throw.
|
|
||||||
There is also a hierarchy of sorts that may make merging this into one context
|
|
||||||
variable more sense, if it hadn't been for HTML's reasonably rigid structure.
|
|
||||||
A CSS property will never contain an HTML attribute. So we won't ever get
|
|
||||||
recursive relations, and having multiple depths won't ever make sense. Leave
|
|
||||||
this be.
|
|
||||||
|
|
||||||
We already have this information, and consequently, using start and end is
|
|
||||||
*unnecessary*, so long as the context variables are set appropriately. We don't
|
|
||||||
care if an error was thrown by an attribute transform or an attribute definition;
|
|
||||||
to the end user these are the same (for a developer, they are different, but
|
|
||||||
they're better off with a stack trace (which we should add support for) in such
|
|
||||||
cases).
|
|
||||||
|
|
||||||
3. Remove start()/end() code. Don't get rid of recursion, though [DONE]
|
|
||||||
4. Setup ErrorCollector to use context information to setup hierarchies.
|
|
||||||
This may require a different internal format. Use objects if it gets
|
|
||||||
complex. [DONE]
|
|
||||||
|
|
||||||
ASIDE
|
|
||||||
More on this topic: since we are now binding errors to lines
|
|
||||||
and columns, a particular error can have three relationships to that
|
|
||||||
specific location:
|
|
||||||
|
|
||||||
1. The token at that location directly
|
|
||||||
RemoveForeignElements
|
|
||||||
AttrValidator (transforms)
|
|
||||||
MakeWellFormed
|
|
||||||
2. A "component" of that token (i.e. attribute)
|
|
||||||
AttrValidator (removals)
|
|
||||||
3. A modification to that node (i.e. contents from start to end
|
|
||||||
token) as a whole
|
|
||||||
FixNesting
|
|
||||||
|
|
||||||
This needs to be marked accordingly. In the presentation, it might
|
|
||||||
make sense keep (3) separate, have (2) a sublist of (1). (1) can
|
|
||||||
be a closing tag, in which case (3) makes no sense at all, OR it
|
|
||||||
should be related with its opening tag (this may not necessarily
|
|
||||||
be possible before MakeWellFormed is run).
|
|
||||||
|
|
||||||
So, the line and column counts as our identifier, so:
|
|
||||||
|
|
||||||
$errors[$line][$col] = ...
|
|
||||||
|
|
||||||
Then, we need to identify case 1, 2 or 3. They are identified as
|
|
||||||
such:
|
|
||||||
|
|
||||||
1. Need some sort of semaphore in RemoveForeignElements, etc.
|
|
||||||
2. If CurrentAttr/CurrentCssProperty is non-null
|
|
||||||
3. Default (FixNesting, MakeWellFormed)
|
|
||||||
|
|
||||||
One consideration about (1) is that it usually is actually a
|
|
||||||
(3) modification, but we have no way of knowing about that because
|
|
||||||
of various optimizations. However, they can probably be treated
|
|
||||||
the same. The other difficulty is that (3) is never a line and
|
|
||||||
column; rather, it is a range (i.e. a duple) and telling the user
|
|
||||||
the very start of the range may confuse them. For example,
|
|
||||||
|
|
||||||
<b>Foo<div>bar</div></b>
|
|
||||||
^ ^
|
|
||||||
|
|
||||||
The node being operated on is <b>, so the error would be assigned
|
|
||||||
to the first caret, with a "node reorganized" error. Then, the
|
|
||||||
ChildDef would have submitted its own suggestions and errors with
|
|
||||||
regard to what's going in the internals. So I suppose this is
|
|
||||||
ok. :-)
|
|
||||||
|
|
||||||
Now, the structure of the earlier mentioned ... would be something
|
|
||||||
like this:
|
|
||||||
|
|
||||||
object {
|
|
||||||
type = (token|attr|property),
|
|
||||||
value, // appropriate for type
|
|
||||||
errors => array(),
|
|
||||||
sub-errors = [recursive],
|
|
||||||
}
|
|
||||||
|
|
||||||
This helps us keep things agnostic. It is also sufficiently complex
|
|
||||||
enough to warrant an object.
|
|
||||||
|
|
||||||
So, more wanking about the object format is in order. The way HTML Purifier is
|
|
||||||
currently setup, the only possible hierarchy is:
|
|
||||||
|
|
||||||
token -> attr -> css property
|
|
||||||
|
|
||||||
These relations do not exist all of the time; a comment or end token would not
|
|
||||||
ever have any attributes, and non-style attributes would never have CSS properties
|
|
||||||
associated with them.
|
|
||||||
|
|
||||||
I believe that it is worth supporting multiple paths. At some point, we might
|
|
||||||
have a hierarchy like:
|
|
||||||
|
|
||||||
* -> syntax
|
|
||||||
-> token -> attr -> css property
|
|
||||||
-> url
|
|
||||||
-> css stylesheet <style>
|
|
||||||
|
|
||||||
et cetera. Now, one of the practical implications of this is that every "node"
|
|
||||||
on our tree is well-defined, so in theory it should be possible to either 1.
|
|
||||||
create a separate class for each error struct, or 2. embed this information
|
|
||||||
directly into HTML Purifier's token stream. Embedding the information in the
|
|
||||||
token stream is not a terribly good idea, since tokens can be removed, etc.
|
|
||||||
So that leaves us with 1... and if we use a generic interface we can cut down
|
|
||||||
on a lot of code we might need. So let's leave it like this.
|
|
||||||
|
|
||||||
~~~~
|
|
||||||
|
|
||||||
Then we setup suggestions.
|
|
||||||
|
|
||||||
5. Setup a separate error class which tells the user any modifications
|
|
||||||
HTML Purifier made.
|
|
||||||
|
|
||||||
Some information about this:
|
|
||||||
|
|
||||||
Our current paradigm is to tell the user what HTML Purifier did to the HTML.
|
|
||||||
This is the most natural mode of operation, since that's what HTML Purifier
|
|
||||||
is all about; it was not meant to be a validator.
|
|
||||||
|
|
||||||
However, most other people have experience dealing with a validator. In cases
|
|
||||||
where HTML Purifier unambiguously does the right thing, simply giving the user
|
|
||||||
the correct version isn't a bad idea, but problems arise when:
|
|
||||||
|
|
||||||
- The user has such bad HTML we do something odd, when we should have just
|
|
||||||
flagged the HTML as an error. Such examples are when we do things like
|
|
||||||
remove text from directly inside a <table> tag. It was probably meant to
|
|
||||||
be in a <td> tag or be outside the table, but we're not smart enough to
|
|
||||||
realize this so we just remove it. In such a case, we should tell the user
|
|
||||||
that there was foreign data in the table, but then we shouldn't "demand"
|
|
||||||
the user remove the data; it's more of a "here's a possible way of
|
|
||||||
rectifying the problem"
|
|
||||||
|
|
||||||
- Giving line context for input is hard enough, but feasible; giving output
|
|
||||||
line context will be extremely difficult due to shifting lines; we'd probably
|
|
||||||
have to track what the tokens are and then find the appropriate out context
|
|
||||||
and it's not guaranteed to work etc etc etc.
|
|
||||||
|
|
||||||
````````````
|
|
||||||
|
|
||||||
Don't forget to spruce up output.
|
|
||||||
|
|
||||||
6. Output needs to automatically give line and column numbers, basically
|
|
||||||
"at line" on steroids. Look at W3C's output; it's ok. [PARTIALLY DONE]
|
|
||||||
|
|
||||||
- We need a standard CSS to apply (check demo.css for some starting
|
|
||||||
styling; some buttons would also be hip)
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
|
@ -1,137 +0,0 @@
|
||||||
|
|
||||||
Filter Levels
|
|
||||||
When one size *does not* fit all
|
|
||||||
|
|
||||||
It makes little sense to constrain users to one set of HTML elements and
|
|
||||||
attributes and tell them that they are not allowed to mold this in
|
|
||||||
any fashion. Many users demand to be able to custom-select which elements
|
|
||||||
and attributes they want. This is fine: because HTML Purifier keeps close
|
|
||||||
track of what elements are safe to use, there is no way for them to
|
|
||||||
accidently allow an XSS-able tag.
|
|
||||||
|
|
||||||
However, combing through the HTML spec to make your own whitelist can
|
|
||||||
be a daunting task. HTML Purifier ought to offer pre-canned filter levels
|
|
||||||
that amateur users can select based on what they think is their use-case.
|
|
||||||
|
|
||||||
Here are some fuzzy levels you could set:
|
|
||||||
|
|
||||||
1. Comments - Wordpress recommends a, abbr, acronym, b, blockquote, cite,
|
|
||||||
code, em, i, strike, strong; however, you could get away with only a, em and
|
|
||||||
p; also having blockquote and pre tags would be helpful.
|
|
||||||
2. BBCode - Emulate the usual tagset for forums: b, i, img, a, blockquote,
|
|
||||||
pre, div, span and h[2-6] (the last three are for specially formatted
|
|
||||||
posts, div and span require associated classes or inline styling enabled
|
|
||||||
to be useful)
|
|
||||||
3. Pages - As permissive as possible without allowing XSS. No protection
|
|
||||||
against bad design sense, unfortunantely. Suitable for wiki and page
|
|
||||||
environments. (probably what we have now)
|
|
||||||
4. Lint - Accept everything in the spec, a Tidy wannabe. (This probably won't
|
|
||||||
get implemented as it would require routines for things like <object>
|
|
||||||
and friends to be implemented, which is a lot of work for not a lot of
|
|
||||||
benefit)
|
|
||||||
|
|
||||||
One final note: when you start axing tags that are more commonly used, you
|
|
||||||
run the risk of accidentally destroying user data, especially if the data
|
|
||||||
is incoming from a WYSIWYG editor that hasn't been synced accordingly. This may
|
|
||||||
make forbidden element to text transformations desirable (for example, images).
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
== Element Risk Analysis ==
|
|
||||||
|
|
||||||
Although none of the currently supported elements presents a security
|
|
||||||
threat per-say, some can cause problems for page layouts or be
|
|
||||||
extremely complicated.
|
|
||||||
|
|
||||||
Legend:
|
|
||||||
[danger level] - regular tags / uncommon tags ~ deprecated tags
|
|
||||||
[danger level]* - rare tags
|
|
||||||
|
|
||||||
1 - blockquote, code, em, i, p, tt / strong, sub, sup
|
|
||||||
1* - abbr, acronym, bdo, cite, dfn, kbd, q, samp
|
|
||||||
2 - b, br, del, div, pre, span / ins, s, strike ~ u
|
|
||||||
3 - h2, h3, h4, h5, h6 ~ center
|
|
||||||
4 - h1, big ~ font
|
|
||||||
5 - a
|
|
||||||
7 - area, map
|
|
||||||
|
|
||||||
These are special use tags, they should be enabled on a blanket basis.
|
|
||||||
|
|
||||||
Lists - dd, dl, dt, li, ol, ul ~ menu, dir
|
|
||||||
Tables - caption, table, td, th, tr / col, colgroup, tbody, tfoot, thead
|
|
||||||
|
|
||||||
Forms - fieldset, form, input, lable, legend, optgroup, option, select, textarea
|
|
||||||
XSS - noscript, object, script ~ applet
|
|
||||||
Meta - base, basefont, body, head, html, link, meta, style, title
|
|
||||||
Frames - frame, frameset, iframe
|
|
||||||
|
|
||||||
And tag specific notes:
|
|
||||||
|
|
||||||
a - general problems involving linkspam
|
|
||||||
b - too much bold is bad, typographically speaking bold is discouraged
|
|
||||||
br - often misused
|
|
||||||
center - CSS, usually no legit use
|
|
||||||
del - only useful in editing context
|
|
||||||
div - little meaning in certain contexts i.e. blog comment
|
|
||||||
h1 - usually no legit use, as header is already set by application
|
|
||||||
h* - not needed in blog comments
|
|
||||||
hr - usually not necessary in blog comments
|
|
||||||
img - could be extremely undesirable if linking to external pics (CSRF, goatse)
|
|
||||||
pre - could use formatting, only useful in code contexts
|
|
||||||
q - very little support
|
|
||||||
s - transform into span with styling or del?
|
|
||||||
small - technically presentational
|
|
||||||
span - depends on attribute allowances
|
|
||||||
sub, sup - specialized
|
|
||||||
u - little legit use, prefer class with text-decoration
|
|
||||||
|
|
||||||
Based on the riskiness of the items, we may want to offer %HTML.DisableImages
|
|
||||||
attribute and put URI filtering higher up on the priority list.
|
|
||||||
|
|
||||||
|
|
||||||
== Attribute Risk Analysis ==
|
|
||||||
|
|
||||||
We actually have a suprisingly small assortment of allowed attributes (the
|
|
||||||
rest are deprecated in strict, and thus we opted not to allow them, even
|
|
||||||
though our output is XHTML Transitional by default.)
|
|
||||||
|
|
||||||
Required URI - img.alt, img.src, a.href
|
|
||||||
Medium risk - *.class, *.dir
|
|
||||||
High risk - img.height, img.width, *.id, *.style
|
|
||||||
|
|
||||||
Table - colgroup/col.span, td/th.rowspan, td/th.colspan
|
|
||||||
Uncommon - *.title, *.lang, *.xml:lang
|
|
||||||
Rare - td/th.abbr, table.summary, {table}.charoff
|
|
||||||
Rare URI - del.cite, ins.cite, blockquote.cite, q.cite, img.longdesc
|
|
||||||
Presentational - {table}.align, {table}.valign, table.frame, table.rules,
|
|
||||||
table.border
|
|
||||||
Partially presentational - table.cellpadding, table.cellspacing,
|
|
||||||
table.width, col.width, colgroup.width
|
|
||||||
|
|
||||||
|
|
||||||
== CSS Risk Analysis ==
|
|
||||||
|
|
||||||
Currently, there is no support for fine-grained "allowed CSS" specification,
|
|
||||||
mainly because I'm lazy, partially because no one has asked for it. However,
|
|
||||||
this will be added eventually.
|
|
||||||
|
|
||||||
There are certain CSS elements that are extremely useful inline, but then
|
|
||||||
as you get to more presentation oriented styling it may not always be
|
|
||||||
appropriate to inline them.
|
|
||||||
|
|
||||||
Useful - clear, float, border-collapse, caption-side
|
|
||||||
|
|
||||||
These CSS properties can break layouts if used improperly. We have excluded
|
|
||||||
any CSS properties that are not currently implemented (such as position).
|
|
||||||
|
|
||||||
Dangerous, can go outside container - float
|
|
||||||
Easy to abuse - font-size, font-family (font), width
|
|
||||||
Colored - background-color (background), border-color (border), color
|
|
||||||
(see proposal-colors.html)
|
|
||||||
Dramatic - border, list-style-position (list-style), margin, padding,
|
|
||||||
text-align, text-indent, text-transform, vertical-align, line-height
|
|
||||||
|
|
||||||
Dramatic elements substantially change the look of text in ways that should
|
|
||||||
probably have been reserved to other areas.
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
|
@ -1,64 +0,0 @@
|
||||||
We are going to model our I18N/L10N off of MediaWiki's system. Their's is
|
|
||||||
obviously quite complicated, so we're going to simplify it a bit for our needs.
|
|
||||||
|
|
||||||
== Caching ==
|
|
||||||
|
|
||||||
MediaWiki has lots of caching mechanisms built in, which make the code somewhat
|
|
||||||
more difficult to understand. Before doing any loading, MediaWiki will check
|
|
||||||
the following places to see if we can be lazy:
|
|
||||||
|
|
||||||
1. $mLocalisationCache[$code] - just a variable where it may have been stashed
|
|
||||||
2. serialized/$code.ser - compiled serialized language file
|
|
||||||
3. Memcached version of file (with expiration checking)
|
|
||||||
|
|
||||||
Expiration checking consists of by ensuring all dependencies have filemtime
|
|
||||||
that match the ones bundled with the cached copy. Similar checking could be
|
|
||||||
implemented for serialized versions, as it seems that they are not updated
|
|
||||||
until manually recompiled.
|
|
||||||
|
|
||||||
== Behavior ==
|
|
||||||
|
|
||||||
Things that are localizable:
|
|
||||||
|
|
||||||
- Weekdays (and abbrev)
|
|
||||||
- Months (and abbrev)
|
|
||||||
- Bookstores
|
|
||||||
- Skin names
|
|
||||||
- Date preferences / Custom date format
|
|
||||||
- Default date format
|
|
||||||
- Default user option overrides
|
|
||||||
-+ Language names
|
|
||||||
- Timezones
|
|
||||||
-+ Character encoding conversion via iconv
|
|
||||||
- UpperLowerCase first (needs casemaps for some)
|
|
||||||
- UpperLowerCase
|
|
||||||
- Uppercase words
|
|
||||||
- Uppercase word breaks
|
|
||||||
- Case folding
|
|
||||||
- Strip punctuation for MySQL search
|
|
||||||
- Get first character
|
|
||||||
-+ Alternate encoding
|
|
||||||
-+ Recoding for edit (and then recode input)
|
|
||||||
-+ RTL
|
|
||||||
-+ Direction mark character depending on RTL
|
|
||||||
-? Arrow depending on RTL
|
|
||||||
- Languages where italics cannot be used
|
|
||||||
-+ Number formatting (commafy, transform digits, transform separators)
|
|
||||||
- Truncate (multibyte)
|
|
||||||
- Grammar conversions for inflected languages
|
|
||||||
- Plural transformations
|
|
||||||
- Formatting expiry times
|
|
||||||
- Segmenting for diffs (Chinese)
|
|
||||||
- Convert to variants of language
|
|
||||||
- Language specific user preference options
|
|
||||||
- Link trails [[foo]]bar
|
|
||||||
-+ Language code (RFC 3066)
|
|
||||||
|
|
||||||
Neat functionality:
|
|
||||||
|
|
||||||
- I18N sprintfDate
|
|
||||||
- Roman numeral formatting
|
|
||||||
|
|
||||||
Items marked with a + likely need to be addressed by HTML Purifier
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
|
@ -1,44 +0,0 @@
|
||||||
|
|
||||||
Configuration Ideas
|
|
||||||
|
|
||||||
Here are some theoretical configuration ideas that we could implement some
|
|
||||||
time. Note the naming convention: %Namespace.Directive. If you want one
|
|
||||||
implemented, give us a ring, and we'll move it up the priority chain.
|
|
||||||
|
|
||||||
%Attr.RewriteFragments - if there's %Attr.IDPrefix we may want to transparently
|
|
||||||
rewrite the URLs we parse too. However, we can only do it when it's a pure
|
|
||||||
anchor link, so it's not foolproof
|
|
||||||
|
|
||||||
%Attr.ClassBlacklist,
|
|
||||||
%Attr.ClassWhitelist,
|
|
||||||
%Attr.ClassPolicy - determines what classes are allowed. When
|
|
||||||
%Attr.ClassPolicy is set to Blacklist, only allow those not in
|
|
||||||
%Attr.ClassBlacklist. When it's Whitelist, only allow those in
|
|
||||||
%Attr.ClassWhitelist.
|
|
||||||
|
|
||||||
%Attr.MaxWidth,
|
|
||||||
%Attr.MaxHeight - caps for width and height related checks.
|
|
||||||
(the hack in Pixels for an image crashing attack could be replaced by this)
|
|
||||||
|
|
||||||
%URI.AddRelNofollow - will add rel="nofollow" to all links, preventing the
|
|
||||||
spread of ill-gotten pagerank
|
|
||||||
|
|
||||||
%URI.HostBlacklistRegex - regexes that if matching the host are disallowed
|
|
||||||
%URI.HostWhitelist - domain names that are excluded from the host blacklist
|
|
||||||
%URI.HostPolicy - determines whether or not its reject all and then whitelist
|
|
||||||
or allow all in then do specific blacklists with whitelist intervening.
|
|
||||||
'DenyAll' or 'AllowAll' (default)
|
|
||||||
|
|
||||||
%URI.DisableIPHosts - URIs that have IP addresses for hosts are disallowed.
|
|
||||||
Be sure to also grab unusual encodings (dword, hex and octal), which may
|
|
||||||
be currently be caught by regular DNS
|
|
||||||
%URI.DisableIDN - Disallow raw internationalized domain names. Punycode
|
|
||||||
will still be permitted.
|
|
||||||
|
|
||||||
%URI.ConvertUnusualIPHosts - transform dword/hex/octal IP addresses to the
|
|
||||||
regular form
|
|
||||||
%URI.ConvertAbsoluteDNS - Remove extra dots after host names that trigger
|
|
||||||
absolute DNS. While this is actually the preferred method according to
|
|
||||||
the RFC, most people opt to use a relative domain name relative to . (root).
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
218
vendor/ezyang/htmlpurifier/docs/proposal-plists.txt
vendored
|
@ -1,218 +0,0 @@
|
||||||
THE UNIVERSAL DESIGN PATTERN: PROPERTIES
|
|
||||||
Steve Yegge
|
|
||||||
|
|
||||||
Implementation:
|
|
||||||
get(name)
|
|
||||||
put(name, value)
|
|
||||||
has(name)
|
|
||||||
remove(name)
|
|
||||||
iteration, with filtering [this will be our namespaces]
|
|
||||||
parent
|
|
||||||
|
|
||||||
Representations:
|
|
||||||
- Keys are strings
|
|
||||||
- It's nice to not need to quote keys (if we formulate our own language,
|
|
||||||
consider this)
|
|
||||||
- Property not present representation (key missing)
|
|
||||||
- Frequent removal/re-add may have null help. If null is valid, use
|
|
||||||
another value. (PHP semantics are weird here)
|
|
||||||
|
|
||||||
Data structures:
|
|
||||||
- LinkedHashMap is wonderful (O(1) access and maintains order)
|
|
||||||
- Using a special property that points to the parent is usual
|
|
||||||
- Multiple inheritance possible, need rules for which to lookup first
|
|
||||||
- Iterative inheritance is best
|
|
||||||
- Consider performance!
|
|
||||||
|
|
||||||
Deletion
|
|
||||||
- Tricky problem with inheritance
|
|
||||||
- Distinguish between "not found" and "look in my parent for the property"
|
|
||||||
[Maybe HTML Purifier won't allow deletion]
|
|
||||||
|
|
||||||
Read/write asymmetry (it's correct!)
|
|
||||||
|
|
||||||
Read-only plists
|
|
||||||
- Allow ability to freeze [this is what we have already]
|
|
||||||
- Don't overuse it
|
|
||||||
|
|
||||||
Performance:
|
|
||||||
- Intern strings (PHP does this already)
|
|
||||||
- Don't be case-insensitive
|
|
||||||
- If all properties in a plist are known a-priori, you can use a "perfect"
|
|
||||||
hash function. Often overkill.
|
|
||||||
- Copy-on-read caching "plundering" reduces lookup, but uses memory and can
|
|
||||||
grow stale. Use as last resort.
|
|
||||||
- Refactoring to fields. Watch for API compatibility, system complexity,
|
|
||||||
and lack of flexibility.
|
|
||||||
- Refrigerator: external data-structure to hold plists
|
|
||||||
|
|
||||||
Transient properties:
|
|
||||||
[Don't need to worry about this]
|
|
||||||
- Use a separate plist for transient properties
|
|
||||||
- Non-numeric override; numeric should ADD
|
|
||||||
- Deletion: removeTransientProperty() and transientlyRemoveProperty()
|
|
||||||
|
|
||||||
Persistence:
|
|
||||||
- XML/JSON are good
|
|
||||||
- Text-based is good for readability, maintainability and bootstrapping
|
|
||||||
- Compressed binary format for network transport [not necessary]
|
|
||||||
- RDBMS or XML database
|
|
||||||
|
|
||||||
Querying: [not relevant]
|
|
||||||
- XML database is nice for XPath/XQuery
|
|
||||||
- jQuery for JSON
|
|
||||||
- Just load it all into a program
|
|
||||||
|
|
||||||
Backfills/Data integrity:
|
|
||||||
- Use usual methods
|
|
||||||
- Lazy backfill is a nice hack
|
|
||||||
|
|
||||||
Type systems:
|
|
||||||
- Flags: ReadOnly, Permanent, DontEnum
|
|
||||||
- Typed properties isn't that useful [It's also Not-PHP]
|
|
||||||
- Seperate meta-list of directive properties IS useful
|
|
||||||
- Duck typing is useful for systems designed fully around properties pattern
|
|
||||||
|
|
||||||
Trade-off:
|
|
||||||
+ Flexibility
|
|
||||||
+ Extensibility
|
|
||||||
+ Unit-testing/prototype-speed
|
|
||||||
- Performance
|
|
||||||
- Data integrity
|
|
||||||
- Navagability/Query-ability
|
|
||||||
- Reversability (hard to go back)
|
|
||||||
|
|
||||||
HTML Purifier
|
|
||||||
|
|
||||||
We are not happy with our current system of defining configuration directives,
|
|
||||||
because it has become clear that things will get a lot nicer if we allow
|
|
||||||
multiple namespaces, and there are some features that naturally lend themselves
|
|
||||||
to inheritance, which we do not really support well.
|
|
||||||
|
|
||||||
One of the considered implementation changes would be to go from a structure
|
|
||||||
like:
|
|
||||||
|
|
||||||
array(
|
|
||||||
'Namespace' => array(
|
|
||||||
'Directive' => 'val1',
|
|
||||||
'Directive2' => 'val2',
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
to:
|
|
||||||
|
|
||||||
array(
|
|
||||||
'Namespace.Directive' => 'val1',
|
|
||||||
'Namespace.Directive2' => 'val2',
|
|
||||||
)
|
|
||||||
|
|
||||||
The below implementation takes more memory, however, and it makes it a bit
|
|
||||||
complicated to grab all values from a namespace.
|
|
||||||
|
|
||||||
The alternate implementation choice is to allow nested plists. This keeps
|
|
||||||
iteration easy, but is problematic for inheritance (it would be difficult
|
|
||||||
to distinguish a plist from an array) and retrieval (when specifying multiple
|
|
||||||
namespaces we would need some multiple de-referencing).
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
We can bite the performance hit, and just do iteration with filter
|
|
||||||
(the strncmp call should be relatively cheap). Then, users should be able
|
|
||||||
to optimize doing something like:
|
|
||||||
|
|
||||||
$config = HTMLPurifier_Config::createDefault();
|
|
||||||
if (!file_exists('config.php')) {
|
|
||||||
// set up $config
|
|
||||||
$config->save('config.php');
|
|
||||||
} else {
|
|
||||||
$config->load('config.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
Or maybe memcache, or something. This means that "// set up $config" must
|
|
||||||
not have any dynamic parts, or the user has to invalidate the cache when
|
|
||||||
they do update it. We have to think about this a little more carefully; the
|
|
||||||
file call might be more expensive.
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
This might get expensive, however, when we actually care about iterating
|
|
||||||
over the configuration and want the actual values. So what about nesting the
|
|
||||||
lists?
|
|
||||||
|
|
||||||
"ns.sub.directive" => values['ns']['sub']['directive']
|
|
||||||
|
|
||||||
We can distinguish between plists and arrays by using ArrayObjects for the
|
|
||||||
plists, and regular arrays for the arrays? Alternatively, use ArrayObjects
|
|
||||||
for the arrays, and regular arrays for the plists.
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Implementation demands, and what has caused them:
|
|
||||||
|
|
||||||
1. DefinitionCache, the HTML, CSS and URI namespaces have caches attached to them
|
|
||||||
Results:
|
|
||||||
- getBatchSerial()
|
|
||||||
- getBatch() : in general, the ability to traverse just a namespace
|
|
||||||
|
|
||||||
2. AutoFormat/Filter, this is a plugin architecture, directives not hard-coded
|
|
||||||
- getBatch()
|
|
||||||
|
|
||||||
3. Configuration form
|
|
||||||
- Namespaces used to organize directives
|
|
||||||
|
|
||||||
Other than that, we have a pure plist. PERHAPS we should maintain separate things
|
|
||||||
for these different demands.
|
|
||||||
|
|
||||||
Issue 2: Directives for configuring the plugins are regular plists, but
|
|
||||||
when enabling them, while it's "plist-ish", what you're really doing is adding
|
|
||||||
them to an array of "autoformatters"/"filters" to enable. We can setup
|
|
||||||
magic BC as well as in the new interface, but there should also be an
|
|
||||||
add('AutoFormat', 'AutoParagraph'); which does the right thing.
|
|
||||||
|
|
||||||
One thing to consider is whether or not inheritance rules will apply to these.
|
|
||||||
I'd say yes. That means that they're still plisty, in fact, the underlying
|
|
||||||
implementation will probably be a plist. However, they will get their OWN
|
|
||||||
plists, and will NOT support nesting.
|
|
||||||
|
|
||||||
Issue 1: Our current implementation is generally not efficient; md5(serialize($foo))
|
|
||||||
is pretty expensive. So, I don't think there will be any problems if it
|
|
||||||
gets "less" efficient, as long as we give users a properly fast alternative;
|
|
||||||
DefinitionRev gives us a way to do this, by simply telling the user they must
|
|
||||||
update it whenever they update Configuration directives as well. (There are
|
|
||||||
obvious BC concerns here).
|
|
||||||
|
|
||||||
In such a case, we simply iterate over our plist (performing full retrievals
|
|
||||||
for each value), grab the entries we care about, and then serialize and hash.
|
|
||||||
It's going to be slow either way, due to the ability of plists to inherit.
|
|
||||||
If we ksort(), we don't have to traverse the entire array, however, the
|
|
||||||
cost of a ksort() call may not be worth it.
|
|
||||||
|
|
||||||
At this point, last time, I started worrying about the performance implications
|
|
||||||
of allowing inheritance, and wondering whether or not I wanted to squash
|
|
||||||
the plist. At first blush, our code might be under the assumption that
|
|
||||||
accessing properties is cheap; but actually we prefer to copy out the value
|
|
||||||
into a member variable if it's going to be used many times. With this is mind
|
|
||||||
I don't think CPU consumption from a few nested function calls is going to
|
|
||||||
be a problem. We *are* going to enforce a function only interface.
|
|
||||||
|
|
||||||
The next issue at hand is how we're going to manage the "special" plists,
|
|
||||||
which should still be able to be inherited. Basically, it means that multiple
|
|
||||||
plists would be attached to the configuration object, which is not the
|
|
||||||
best for memory performance. The alternative is to keep them all in one
|
|
||||||
big plist, and then eat the one-time cost of traversing the entire plist
|
|
||||||
to grab the appropriate values.
|
|
||||||
|
|
||||||
I think at this point we can write the generic interface, and then set up separate
|
|
||||||
plists if that ends up being necessary for performance (it probably won't.) Now
|
|
||||||
lets code our generic plist implementation.
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Iterating over the plist presents some problems. The way we've chosen to solve
|
|
||||||
this is to squash all of the parents.
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
But I don't need iteration.
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
|
@ -1,50 +0,0 @@
|
||||||
|
|
||||||
Handling Content Model Changes
|
|
||||||
|
|
||||||
|
|
||||||
1. Context
|
|
||||||
|
|
||||||
The distinction between Transitional and Strict document types is somewhat
|
|
||||||
of an anomaly in the lineage of XHTML document types (following 1.0, no
|
|
||||||
doctypes do not have flavors: instead, modularization is used to let
|
|
||||||
document authors vary their elements). This transition is usually quite
|
|
||||||
straight-forward, as W3C usually deprecates attributes or elements, which
|
|
||||||
are quite easily handled using tag and attribute transforms.
|
|
||||||
|
|
||||||
However, for two elements, <blockquote>, <body> and <address>, W3C elected
|
|
||||||
to also change the content model. <blockquote> and <body> originally
|
|
||||||
accepted both inline and block elements, but in the strict doctype they
|
|
||||||
only allow block elements. With <address>, the situation is inverted:
|
|
||||||
<p> tags were now forbidden from appearing within this tag.
|
|
||||||
|
|
||||||
|
|
||||||
2. Current situation
|
|
||||||
|
|
||||||
Currently, HTML Purifier treats <blockquote> specially during Tidy mode
|
|
||||||
using a custom ChildDef class StrictBlockquote. StrictBlockquote
|
|
||||||
operates similarly to Required, except that when it encounters an inline
|
|
||||||
element, it will wrap it in a block tag (as specified by
|
|
||||||
%HTML.BlockWrapper, the default is <p>). The naming suggests it can
|
|
||||||
only be used for <blockquote>s, although it may be possible to
|
|
||||||
genericize it to work on other cases of this nature (this would be of
|
|
||||||
little practical application, as no other element in XHTML 1.1 or earlier
|
|
||||||
has a block-only content model).
|
|
||||||
|
|
||||||
Tidy currently contains no custom, lenient implementation for <address>.
|
|
||||||
If one were to be written, it would likely operate on the principle that,
|
|
||||||
when a <p> tag were to be encountered, it would be replaced with a
|
|
||||||
leading and trailing <br /> tag (the contents of <p>, being inline, are
|
|
||||||
not an issue). There is no prior work with this sort of operation.
|
|
||||||
|
|
||||||
|
|
||||||
3. Outside applicability
|
|
||||||
|
|
||||||
There are a number of other elements that contain restrictive content
|
|
||||||
models, such as <ul> or <span> (the latter is restrictive in that it
|
|
||||||
does not allow block elements). In the former case, an errant node
|
|
||||||
is eliminated completely, in the latter case, the text of the node
|
|
||||||
would is preserved (as the parent node does allow PCDATA). Custom
|
|
||||||
content model implementations probably are not the best way of handling
|
|
||||||
these cases, instead, node bubbling should be implemented instead.
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|
|
@ -1,30 +0,0 @@
|
||||||
|
|
||||||
CSS Length Reference
|
|
||||||
To bound, or not to bound, that is the question
|
|
||||||
|
|
||||||
It's quite a reasonable request, really, and it's already been implemented
|
|
||||||
for HTML. That is, length bounding. It makes little sense to let users
|
|
||||||
define text blocks that have a font-size of 63,360 inches (that's a mile,
|
|
||||||
by the way) or a width of forty-fold the parent container.
|
|
||||||
|
|
||||||
But it's a little more complicated then that. There are multiple units
|
|
||||||
one can use, and we have to a little unit conversion to get things working.
|
|
||||||
Here's what we have:
|
|
||||||
|
|
||||||
Absolute:
|
|
||||||
1 in ~= 2.54 cm
|
|
||||||
1 cm = 10 mm
|
|
||||||
1 pt = 1/72 in
|
|
||||||
1 pc = 12 pt
|
|
||||||
|
|
||||||
Relative:
|
|
||||||
1 em ~= 10.0667 px
|
|
||||||
1 ex ~= 0.5 em, though Mozilla Firefox says 1 ex = 6px
|
|
||||||
1 px ~= 1 pt
|
|
||||||
|
|
||||||
Watch out: font-sizes can also be nested to get successively larger
|
|
||||||
(although I do not relish having to keep track of context font-sizes,
|
|
||||||
this may be necessary, especially for some of the more advanced features
|
|
||||||
for preventing things like white on white).
|
|
||||||
|
|
||||||
vim: et sw=4 sts=4
|
|