
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
A minimal, fast, Python 3.6+ package for parsing Editor.js content.
bleach
library;EditorJsParseError
if data is malformed; pip install pyeditorjs
Optional: install bleach for clean HTML:
pip install bleach
from pyeditorjs import EditorJsParser
editor_js_data = ... # your Editor.js JSON data
parser = EditorJsParser(editor_js_data) # initialize the parser
html = parser.html(sanitize=True) # `sanitize=True` requires `bleach` to be installed
print(html) # your clean HTML
WARNING: This does not sanitize the texts! Please, call
bleach.clean(...)
directly. This also doesn't obtain text from bold texts, markers, etc... - you should use BeautifulSoup for this.
#import bleach
from pyeditorjs import EditorJsParser
editor_js_data = ... # your Editor.js JSON data
parser = EditorJsParser(editor_js_data) # initialize the parser
all_texts = []
for block in parser:
text = getattr(block, 'text', None)
if text:
all_texts.append(text) # all_texts.append(bleach.clean(text))
print(all_texts)
This is a community-provided project, and is not affiliated with the Editor.js team. It was created in my spare time. I cannot make sure that it will receive consistent updates.
Because of this, PRs, bug reports and suggestions are welcome!
FAQs
pyEditorJS
We found that pyeditorjs demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.