File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import InfoPanel from './InfoPanel'
2020import InfoPanelTrashed from './InfoPanelTrashed'
2121import { formatDate } from 'browser/lib/date-formatter'
2222import { getTodoPercentageOfCompleted } from 'browser/lib/getTodoStatus'
23+ import striptags from 'striptags'
2324
2425const electron = require ( 'electron' )
2526const { remote } = electron
@@ -76,7 +77,7 @@ class MarkdownNoteDetail extends React.Component {
7677
7778 note . content = this . refs . content . value
7879 if ( this . refs . tags ) note . tags = this . refs . tags . value
79- note . title = markdown . strip ( findNoteTitle ( note . content ) )
80+ note . title = markdown . strip ( striptags ( findNoteTitle ( note . content ) ) )
8081 note . updatedAt = new Date ( )
8182
8283 this . setState ( {
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import fs from 'fs'
1313import { hashHistory } from 'react-router'
1414import markdown from 'browser/lib/markdown'
1515import { findNoteTitle } from 'browser/lib/findNoteTitle'
16+ import stripgtags from 'striptags'
1617
1718const { remote } = require ( 'electron' )
1819const { Menu, MenuItem, dialog } = remote
@@ -363,7 +364,7 @@ class NoteList extends React.Component {
363364 const newNote = {
364365 content : content ,
365366 folder : folderKey ,
366- title : markdown . strip ( findNoteTitle ( content ) ) ,
367+ title : markdown . strip ( striptags ( findNoteTitle ( content ) ) ) ,
367368 type : 'MARKDOWN_NOTE'
368369 }
369370 dataApi . createNote ( storageKey , newNote )
Original file line number Diff line number Diff line change 7979 "react-redux" : " ^4.4.5" ,
8080 "redux" : " ^3.5.2" ,
8181 "sander" : " ^0.5.1" ,
82+ "striptags" : " ^3.1.0" ,
8283 "superagent" : " ^1.2.0" ,
8384 "superagent-promise" : " ^1.0.3"
8485 },
Original file line number Diff line number Diff line change @@ -6075,6 +6075,10 @@ strip-json-comments@~2.0.1:
60756075 version "2.0.1"
60766076 resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
60776077
6078+ striptags@^3.1.0 :
6079+ version "3.1.0"
6080+ resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.1.0.tgz#763e534338d9cf542f004a4b1eb099e32d295e44"
6081+
60786082style-loader@^0.12.4 :
60796083 version "0.12.4"
60806084 resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.12.4.tgz#ae7d0665dc4dc653daa2fe97bb90914bc1d22d9b"
You can’t perform that action at this time.
0 commit comments