Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: HTML support enabled on messages #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.6.0](https://https///compare/v1.5.1...v1.6.0) (2020-08-28)


### Features

* html support enabled on messages ([db9c5b6](https://https///commit/db9c5b663c2c4cd0ba5946b228b3d7b3a050d393))

### [1.5.1](https://https///compare/v1.5.0...v1.5.1) (2020-08-18)


Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "push-webchat",
"version": "1.5.1",
"version": "1.6.0",
"description": "Chat web widget for React apps and Push chatbots",
"module": "module/index.js",
"main": "lib/index.js",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { PureComponent } from 'react';
import ReactMarkdown from 'react-markdown';
import ReactMarkdown from 'react-markdown/with-html';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';

Expand Down Expand Up @@ -33,6 +33,7 @@ class Message extends PureComponent {
<ReactMarkdown
className={'push-markdown'}
source={text}
escapeHtml={false}
linkTarget={(url) => {
if (!url.startsWith('mailto') && !url.startsWith('javascript')) return '_blank';
return undefined;
Expand Down