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

[editor] Sanitize contents when copying results to the clipboard #3409

Merged
merged 1 commit into from
Jul 21, 2023

Conversation

JohanAhlen
Copy link
Contributor

Manually tested

Copy link
Collaborator

@Harshg999 Harshg999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

@bjornalm bjornalm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just a question about the manual testing.

@@ -14,9 +14,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import deXSS from './deXSS';

const html2text = (value: string): string => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like html2text is used by more than just copy to clipboard functionality. Did you check all the cases? e.g. ko.fieldSamples.js:

self.sampleClick = function (html) {
      self.onSampleClick(html2text(html));
      huePubSub.publish('context.popover.hide');
    };

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I saw and tested that one as well.

@JohanAhlen JohanAhlen merged commit 2415223 into master Jul 21, 2023
3 checks passed
@JohanAhlen JohanAhlen deleted the jahlen_sanitize branch July 21, 2023 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants