Comments (3)
It's difficult to understand what's going on. Can you give a file or repo that reproduces and explains the issue?
from showdown-katex.
It's difficult to understand what's going on. Can you give a file or repo that reproduces and explains the issue?
Okay. My bad. I'll explain properly.
I'm using showdown library via the browser as
const converter = new showdown.Converter();
Then I call filterXSS(converter.makeHtml(htmlStuff));
The filterXSS()
function comes from <script src="https://rawgit.com/leizongmin/js-xss/master/dist/xss.js"></script>
The above steps work without integrating your library
But when I integrate with your library via the extension parameter as:
converter = new showdown.Converter({
extensions: [
showdownKatex({
throwOnError: true,
displayMode: false,
errorColor: '#1500ff',
})
]
});
html = converter.makeHtml(string);
target_div_id.innerHTML = filterXSS(html);
Things break.
From my debug attempt, the filterXSS()
strips away the HTML.
When I remove filterXSS()
, it works perfectly.
Is there anyway to filter the output without losing the result?
from showdown-katex.
That seems counter-productive. I imagine filterXSS
is mean to convert html characters to html entities (<script>
-> <script>
) or "make the html safe". It seems like filterXSS
is doing exactly what it's supposed to.
Is there anyway to filter the output without losing the result?
That seems like a question for leizongmin/js-xss
from showdown-katex.
Related Issues (20)
- ReferenceError: window is not defined HOT 2
- [HELP] Need to configure for two types
- Error in rendering HOT 9
- Latex Modifiers are not Rendered HOT 1
- Formulas that contain markdown characters (e.g. '_' for italic) not rendered correctly HOT 1
- "not equal sign" didn't render properly HOT 6
- Is it possible to use without npm? HOT 1
- Use $$ for display mode math? HOT 2
- Rendering error HOT 8
- Invalid rendering or rendering error HOT 6
- `$` block need to double `\` symbol to get the same effects of LaTeX formular HOT 1
- subscript by {} make a mess if one formula has multiple subscripts and latex {} pairs HOT 4
- Can't `yarn build` on M$ Win* Git Bash
- Incorrect `package.json` syntax
- Not relevant anymore. Issue can be deleted. HOT 1
- Add output option to README HOT 1
- node distribution
- NPM version HOT 1
- It seems the matrix output don't correct HOT 2
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 showdown-katex.