Subramanya Sastry has uploaded a new change for review.

Change subject: Get PHP parser to parse extension content for us.
......................................................................

Get PHP parser to parse extension content for us.

* Since we are not going to reimplement every PHP extension
  in JS, we just cheat and get the PHP parser to process
  extension content for us.

* This just calls the PHP api, tokenizes the HTML string and
  strips 'stx=html' from all tokens so the sanitizer doesn't
  strip tokens like a/img/etc.

* Added ExtensionRequest as another API class to act as the
  bridge beween Parsoid and the PHP API.

* Reused template handler wrapping functionality to wrap the
  parsed extension tokens.

* If php-api is disabled, this renders extension as plain
  text wrapped in a span with a mw:Object/Extension/<name>
  typeof attribute.

* Tested on en:Angle sum law

Change-Id: I8aeb7f22d58bb9c4e845c3ef5b9e67a10df1d1da
---
M js/lib/ext.ExtensionContentCollector.js
M js/lib/ext.core.TemplateHandler.js
M js/lib/mediawiki.ApiRequest.js
3 files changed, 152 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/07/38807/1
--
To view, visit https://gerrit.wikimedia.org/r/38807
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8aeb7f22d58bb9c4e845c3ef5b9e67a10df1d1da
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to