misterphilip / ipb-syntaxhighlighter Goto Github PK
View Code? Open in Web Editor NEWSyntaxHighlighter Drop-in replacement for IPB 3.4.x
License: MIT License
SyntaxHighlighter Drop-in replacement for IPB 3.4.x
License: MIT License
Currently within the RTE dialog there are the following options:
SyntaxHighlighter includes options for more, and we should allow the user to select them if they'd like.
If a user edits or uses the quick reply, no highlighting occurs on their posts.
SyntaxHighlighter.highlight();
should be called upon save of an AJAX post.
Due to limits on preg_match* functions, large code values could hit the limit and throw an error / crash php (not good!)
There needs to be a new way to do this (codesyntax.php:93
)
if( preg_match_all( '#<pre[^>]*class\s?=\s?(["\'])((?:(?!\1).)*)_prettyXprint((?:(?!\1).)*)\1[^>]*>((?:(?!</pre>).)*)</pre>#is', $txt, $matches ) > 0 )
Right now on IPB the html, php, sql and xml tags are all left out when it comes to parsing. They were only left in for legacy reasons although they do not do anything anymore source
BBcode export & documentation will need to be updated to reflect this change.
Add in language strings for default editor stuff: http://alexgorbatchev.com/SyntaxHighlighter/manual/configuration/strings.html
One awesome feature that this syntax highlighter allows us to do is to highlight specific lines.
These could be designated by "##" at the beginning of the line, or user specified input.
It is inaccurate in several languages. Like VB classic, and C++ (ist is a weird issue some times.. idk)
XSS:
syntaxhighlighter/js/clipboard.swf?highlighterId=%22%29%29}catch%28e%29{}alert%281%29;//
Click SWF object and it will execute the alart js example..
Letting you know this in the hope that it will get fixed. Because it is a neat hook to have on a programming board.
Move the theme CSS file from the uploads to the hook so the user can edit it within the interface.
There are some options allowed, we should probably consider letting the admin configure these instead of making assumptions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.