Comments (6)
oh placeholder is the only that works. the docs are correct nvm.
from rehype-sanitize.
@wooorm: First, thanks for all your work on unified and related projects. Itβs a joy to work with π
Second, I just got bitten by this π€·
Since two years ago, when you marked this as wontfix
, could you perhaps have reconsidered the situation? Perhaps make attribute case-insensitive (I believe that HTML attributes are case-insensitive, right?)?
Otherwise, would you accept a pull request noting that βplaysInline
, for example, should be playsInline
β more prominently in the documentation? Perhaps both here and in https://github.com/syntax-tree/hast-util-sanitize#schema?
Thanks in advance.
from rehype-sanitize.
Hi @personaaleatoria, welcome! This behavior is expected: we support hast property names (autoFocus
, srcSet
, inputMode
, spellCheck
)
from rehype-sanitize.
Thanks it worked. One note: I've tried placeHolder
and it worked but in the documentation it says that it stays the same: https://github.com/syntax-tree/hast#propertyname.
when it says, "previous rules apply" does it mean that both placeholder
and placeHolder
are expected to work?
from rehype-sanitize.
Can you open a new issue, to improve the docs? (Or maybe even a PR!)
from rehype-sanitize.
Thanks, it works!
import rehypeSanitize, { defaultSchema } from 'rehype-sanitize'
...
.use(rehypeSanitize, {
tagNames: [
...defaultSchema.tagNames!,
'iframe',
'footer',
'header',
'audio',
'source',
],
attributes: {
...defaultSchema.attributes,
a: ['href', 'ref', 'target'],
img: ['src', 'srcSet', 'data*'],
...
from rehype-sanitize.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rehype-sanitize.