2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-06-02 16:04:04 +03:00
Commit Graph

11 Commits

Author SHA1 Message Date
Nikolay Kostyurin 5ceb2f0fa4 fix(plugin-helper): escape case insensitive javascript: attrs 2020-07-08 19:34:12 +02:00
Nikolay Kostyurin 87f38fe97e fix(html): escape bad html (#67)
* feat(preset-html5): add feature to filter javascript: urls

* fix(plugin-helper): escape html in attrs

* fix(plugin-helper): tests for html escape

* refactor(preset-html5): remove html escape from preset

* feat(preset): add ability to pass and extend preset options
2020-07-05 15:23:22 +02:00
Nikolay Kostyurin a16b9f73b0 fix(parser): don't eat not allowed tags with params (#58) fixes #54
* feat(parser): write test for only allowed tags parsing

* chore(parser): rename only allowed test

* fix(parser): only allowed tag rendering

* fix(plugin-helper): add new TagNode toString tests
2020-04-12 21:14:52 +02:00
Nikolay Kostyurin f28f19e64c feat(plugin-helper): move getUniqAttr from preset to plugin helper (#63) 2020-04-12 16:18:47 +02:00
Vladimir 09ff9af9a2 fix(plugin-helper): avoid some malformed attributes in attrsToString (#26)
* attrsToString: To avoid some malformed attributes

Error:
```
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at attrsToString
```

This errors appears if no `attrs` setted in custom tag:
```
const BBcodePresetTemp = BbobPresetHTML5.extend((tags: any) => {
	tags.br = () => ({
		tag: 'br',
		// attrs: {}, // <-- Comment this line for error and add [br] to text
		content: null,
	});

	return tags;
});
```
2019-06-27 08:49:28 +02:00
Nikolay Kostyurin c9e1dabf40 feat(html): @bbob/html now can be used without @bbob/core 2019-03-29 10:29:16 +02:00
Nikolay Kostyurin 505152bf4c fix(plugin-helper): better handle content of TagNode 2018-09-24 00:30:46 +02:00
Nikolay Kostyurin 32a7fb51da refactor(*): convert to babel and generation to lib, es, dist folders (#2)
* refactor(*): convert to babel and generation to lib, es, dist

* chore(*): remove generated files

* fix(*): lint run command
2018-09-09 23:55:28 +02:00
Nikolay Kostyurin 1a84968ea2 feat(*): react render support, move some helper functions to plugin-helper 2018-08-09 02:45:19 +02:00
Nikolay Kostyurin 846d93a2a4 style(plugin-helper): fix eslint errors 2018-08-06 23:57:26 +02:00
Nikolay Kostyurin fb78c4fefb refactor(*): move helper fucntions from core and preset-html5 to separate package — plugin-helper 2018-08-06 23:52:44 +02:00