added bleaching for message

linter
pull/775/head
LianaHus 4 years ago committed by Liana Husikyan
parent b8bbe3dd82
commit b765ff3817
  1. 2
      apps/debugger/src/app/debugger-api.ts
  2. 9
      apps/remix-ide/src/app/tabs/debugger-tab.js
  3. 2
      libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx
  4. 2
      libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts
  5. 2
      libs/remix-ui/debugger-ui/src/lib/tx-browser/tx-browser.tsx
  6. 1086
      package-lock.json
  7. 7
      package.json

@ -131,7 +131,7 @@ export const DebuggerApiMixin = (Base) => class extends Base {
this.off('editor', 'contentChanged')
}
showMessage (title: string, body: string) {}
showMessage (title: string, message: string) {}
}
export class CompilerAbstract implements CompilationOutput { // this is a subset of /remix-ide/src/app/compiler/compiler-abstract.js

@ -8,6 +8,7 @@ import ReactDOM from 'react-dom'
import modalDialogCustom from '../ui/modal-dialog-custom'
const yo = require('yo-yo')
const css = require('./styles/debugger-tab-styles')
const bleach = require('bleach');
const profile = {
name: 'debugger',
@ -62,8 +63,12 @@ export class DebuggerTab extends DebuggerApiMixin(ViewPlugin) {
return this.el
}
showMessage (title, body) {
modalDialogCustom.alert(title, body)
showMessage (title, message) {
try {
modalDialogCustom.alert(title, bleach.sanitize(message))
} catch (e) {
console.log(e)
}
}
renderComponent () {

@ -203,7 +203,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
}).catch((error) => {
if (JSON.stringify(error) !== '{}') {
let message = 'Error: ' + JSON.stringify(error)
message = message.split(`\\"`).join(`'`)
message = message.split('\\"').join('\'')
setState(prevState => {
return {
...prevState,

@ -63,5 +63,5 @@ export interface IDebuggerApi {
getFile: (path: string) => Promise<string>
setFile: (path: string, content: string) => Promise<void>
getDebugWeb3: () => any // returns an instance of web3.js
showMessage (title: string, body: string): void
showMessage (title: string, message: string): void
}

@ -1,4 +1,4 @@
import React, { useState, useEffect, useRef } from 'react'
import React, { useState, useEffect, useRef } from 'react' //eslint-disable-line
import './tx-browser.css'
export const TxBrowser = ({ requestDebug, updateTxNumberFlag, unloadRequested, transactionNumber, debugging }) => {

1086
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -83,7 +83,6 @@
"nightwatch_local_runAndDeploy": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/runAndDeploy.js --env=chrome-runAndDeploy",
"nightwatch_local_url": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/url.test.js --env=chrome",
"nightwatch_local_verticalIconscontextmenu": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/verticalIconsPanel.test.js --env=chrome",
"onchange": "onchange apps/remix-ide/build/app.js -- npm-run-all lint",
"remixd": "nx build remixd & nx serve remixd --folder=./apps/remix-ide/contracts --remixide=http://127.0.0.1:8080",
"selenium": "selenium-standalone start",
@ -141,10 +140,12 @@
"@types/tape": "^4.2.33",
"ansi-gray": "^0.1.1",
"axios": "^0.20.0",
"bleach": "^0.3.0",
"change-case": "^4.1.1",
"chokidar": "^2.1.8",
"color-support": "^1.1.3",
"commander": "^2.20.3",
"document-register-element": "1.13.1",
"ethereumjs-block": "^2.2.2",
"ethereumjs-tx": "^2.1.2",
"ethereumjs-vm": "4.1.3",
@ -154,6 +155,7 @@
"isbinaryfile": "^3.0.2",
"merge": "^1.2.0",
"npm-install-version": "^6.0.2",
"nx": "^11.1.5",
"react": "16.13.1",
"react-beautiful-dnd": "^13.0.0",
"react-bootstrap": "^1.3.0",
@ -161,8 +163,7 @@
"signale": "^1.4.0",
"time-stamp": "^2.2.0",
"winston": "^3.3.3",
"ws": "^7.3.0",
"document-register-element": "1.13.1"
"ws": "^7.3.0"
},
"devDependencies": {
"@babel/core": "^7.4.5",

Loading…
Cancel
Save