Skip to content

Instantly share code, notes, and snippets.

@dacog
dacog / sanitizeHtmlForTelegram.js
Created December 22, 2023 11:19
Telegram API-Compatible HTML Sanitizer in JavaScript
/**
* sanitizeHtmlForTelegram
*
* I am using ActivePieces.com to publish a telegram message using the API, but ince the last API update the HTML tags
* and Markdown support is limited. To make the automation easier (by using the same string in many elemetns) I needed
* a way to sanitize the string to use it for Telegram.
* Here is such a function.
*
* This function sanitizes a given HTML string to ensure compatibility with the Telegram API's supported HTML tags.
* It removes all unsupported HTML tags and retains only those that are allowed by Telegram, such as <b>, <i>, <a>, etc.
@dacog
dacog / template-write-useful-books.md
Last active August 24, 2023 22:04
Writing useful books (Template)
@dacog
dacog / example.ipynb
Created October 14, 2019 22:06
Example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dacog
dacog / Testing foursquare_ide_tools on dataplatform.cloud.ibm.com.ipynb
Last active February 15, 2019 19:00
Testing foursquare_ide_tools on dataplatform.cloud.ibm.com on Jupyter Notebook.ipynb It works :)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dacog
dacog / Untitled1.ipynb
Created February 11, 2019 10:57
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.