Page MenuHomePhabricator

Replace the usages of html() with DOM manipulation
Closed, ResolvedPublic

Description

We'll deploy that fix, and then work on a better solution-- in general, .html() should rarely be used and I'd rather see this fixed with something like (after you remove the leading instance of the page title from page.extract),

$contentbox.append( $('<b></b>').text( page.title ) );
$contentbox.append( $('<span></span>').text( page.extract ) );

Event Timeline

MaxSem assigned this task to Prtksxna.
MaxSem raised the priority of this task from to High.
MaxSem updated the task description. (Show Details)
MaxSem changed Security from none to None.
MaxSem added subscribers: MaxSem, csteipp.

We don't want to add the title at the beginning of the extract but to bold every instance of it. I see what you mean though, and have submitted a patch that removes the need to use .html().

It does however do some string mangling that I am not very comfortable with.

Change 176908 had a related patch set uploaded (by Prtksxna):
Remove the need of .html in article.getProcessedHtml

https://gerrit.wikimedia.org/r/176908

Patch-For-Review

It does however do some string mangling that I am not very comfortable with.

I feel better about this after seeing @csteipp's comment on the patch.

Change 176908 merged by jenkins-bot:
Remove the need of .html in article.getProcessedHtml

https://gerrit.wikimedia.org/r/176908