Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Is there a String Escaping/Unescaping (Javascript) Plugin for Notepad++?
When looking at Javascript code, quite often quoted strings are used similar to the notation used in JSON, e.g. when looking at the source code generated by Googletagmanager, the complete javascript or html code I entered as tag definition shows up as encoded Javascript string. To debug this, it is useful to be able to decode the string. I currently do this with a perl script. but it would be better to have a plugin function in Notepad++ to do this directly.
E.g. convert "\x3cscript\x3ealert(\x22hello\x22);\x3c/script\x3e" to
<script>alert("hello");</script>
The same would make sense the other way as encoding as well.
Well, as of N++, I know only of solutions for URI unescaping, not JS unescaping. But from your question you seem you know scripting so maybe you can adjust script in this solution to unescape JS format instead of URI format. And it also opens you a way for other possible text transformations, if you think of some in future.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
was wondering if there is any way to have the functionality of converting a html page to pdf without the need to third party plugins. So in other words just using PHP, Javascript etc or a combination of web based languages.
Sorry to say this, but in this case a library probably is your best bet. It is possible to write one from scratch, but it's extremely time consuming, since you have to write a function, that renders the HTML/CSS to vector.
It depends on what you mean by 3rd party. If you want a native js or php function, then, no. There is no such thing. But if you want to use a library, there are a couple.
A quick google search turned up
http://parall.ax/products/jspdf
http://code.google.com/p/jspdf/
Generating PDF files with Javascript
http://www.fpdf.org/
http://phptopdf.com/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
(My apologies if this exists, but I have not seen a response to this flavor of preventing java script injections)
Detail: All handling would be on server side.
I want my users to be able to post HTML tags in general, but I am looking for a way to limit what tags and effects can by used. Are there any existing solutions online for this? (I do not want to encode my users content.
Yes:
Text + Formatting
Links
Lists
Images
No:
CSS: by ref, by tag or inline
JS: by ref, by tag or inline
IFrames
Objects
Any thoughts?
You could use the HtmlAgilityPack to parse the input from the user as HTML and easily detect and remove unwanted tags.
http://htmlagilitypack.codeplex.com/
When I'm doing sanitization on the client side, I tend to reach for sanitize.js - I believe it has all of what you're looking for and more
https://github.com/gbirke/Sanitize.js/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'd like to display a block of JavaScript code on my website, and have it marked up in such a way that the variables, reserved words, ect, are color coded. I've checked several site for their CSS and JavaScript which is assigning classes and styles to the text, but so far, all of their methods have been sufficiently obfuscated such that I can't utilize their methods. I found and easily implemented a FANTASTIC format tool in JS-Beautify, but it doesn't color code. I saw that he is using code-mirror on his web interface, but was unable to determine how to implement it on my own. Unfortunately, doing an internet search for this isn't helping a lot because when you combine search terms Javascript, code, CSS, format, markup, stylsheet, etc. all kinds of results appear, but none of what I want.
Does anyone know where I can find either a CSS for Javascript code, or a combo of JS & CSS to apply classes/styles to color code my code?
Thanks!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I want to know if there's an existing Javascript library for validating HTML, preferably not one that relies on a web API.
The closest I've found to this is John Resig's HTML parser, but that seems to be more about fixing HTML and converting it to XML.
So is there something out there already? And if not, how difficult (and lengthy) would it be to adapt John Resig's parser?
No, there isn't one. However I am writing one: https://github.com/peterjwest/html_validator
You can't validate HTML with Javascript, because Javascript is loaded from within the HTML, which means the HTML is already rendered by the browser, which means all you can see with Javascript is the dom tree. The dom tree is built by the browser, but renders with and 'fixes' invalidations.
In short: What you need to validate HTML, is the HTML source. Javascript has access to the DOM, but not to the source.
edit
And immediately after posting, I'm thinking... You don't mean validating its own page =) You just want to validate a string with a javascript... So ignore this =)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
What I'm looking for is something similar to this ASP.net Ajax Control.
However, I need a solution that uses only free technologies (e.g. PHP, Javascript).
I like TinyMCE
Have you checked CKEditor (ex FCKEditor). This is one of the most powerful editors. But it depends what your end users are. If they're developers then consider something similar that SO uses (WMD Editor). Much easier and faster to use. SO guys actually changed it to some degree but the original was used at first.
Basically you don't need it to tie to any server-side technology as long as it's programmable on the client side.
Probably the most popular is the FCKeditor - now renamed CKeditor.