Refine replaceWithHighlight function during searching a contact

RESOLVED WONTFIX

Status

Firefox OS
Gaia::Contacts
RESOLVED WONTFIX
4 years ago
5 months ago

People

(Reporter: seanlee, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
(In reply to Sergi Mansilla [:sergi] (Telenor) from bug 1078978 comment #4)
> Comment on attachment 8500814 [details] [review]
> Pull request for master
> 
> Hi Sean,
> 
> Thanks for your patch. I gave it an r- for two reasons (both of which are
> not your fault at all, but of the previous code):
> 
> - I find the code confusing and this is a good opportunity to make it
> better. That RegExp is giving me an eyesore.
> 
> - I believe there is a project-wide decision of not using `innerHTML` to
> manipulate the DOM due to security concerns; it would be great if you can
> use normal DOM manipulation. This code could use a DocumentFragment to build
> the final result, for example.
> 
> Cheers!
(Reporter)

Comment 1

4 years ago
Thanks for Sergi's comments.
Because the previous bug 1078978 is with 2.0m flag, we create a this bug to discuss how to avoid using innerHTML and too complex regexp.

Comment 2

5 months ago
Firefox OS is not being worked on
Status: NEW → RESOLVED
Last Resolved: 5 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.