
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
octopress-escape-code
Advanced tools
Automatically escape code blocks so you can use liquid tags without worry having to surround them with unsightly
{% raw %}
and {% endraw %}
tags. This escapes code block created with {% highlight %}
, {% codeblock %}
, code fences,
Markdown indented code blocks, and in-line back tick code tags.
Add this gem to your site's Gemfile in the :jekyll_plugins
group:
group :jekyll_plugins do
gem 'octopress-escape-code'
end
Then install the gem with Bundler
$ bundle
$ gem install octopress-escape-code
Then add the gem to your Jekyll configuration.
gems:
-octopress-escape-code
To escape code blocks on a single page, add this configuration to the page's YAML front-matter.
escape_code: true
If you prefer, you can enable it on a site-wide basis.
// in Jekyll's _config.yml
escape_code: true
Adding escape_code: false
any the page's YAML front-matter will disable code escaping for that page.
Before Jekyll parses your pages and posts through Liquid, code is automatically wrapped with {% raw %}
blocks,
ensuring that their contents aren't parsed by Liquid. For example, a {% highlight %}
block's contents are wrapped like this.
{% highlight html %}{% raw %}
<article>{{ post.content }}</article>
{% endraw %}{% endhighlight %}
The {% highlight %}
block is still interpreted by Liquid, but the contents are escaped. This will also escape the
Octopress codeblock plugin.
Some Markdown processors and the Octopress codefence plugin render code blocks which are
surrounded by three back ticks. These are also wrapped with {% raw %}
tags.
{% raw %}
```html
<article>{{ post.content }}</article>
```
{% endraw %}
Liquid sees the raw tags and ignores the contents, but the code fences are still interpreted.
If you are using Markdown, you may create a code blocks by indenting four spaces or a single tab. These code blocks are escaped like this.
{% raw %}
<article>{{ post.content }}</article>
{% endraw %}
You can also define in-line code tags by surrounding text with back ticks, like this `some code`
which are automatically escaped as
well.
This inline {% raw %}`<code>`{% endraw %} tag is escaped.
This works with double back tick code tags as well.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that octopress-escape-code demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.