mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v3.1.1.1
This commit is contained in:
@@ -60,10 +60,10 @@ public class Xof_math_html_wtr {
|
||||
for (int i = bgn; i < end; i++) {
|
||||
byte b = bry[i];
|
||||
switch (b) {
|
||||
case Byte_ascii.Lt: if (mathjax) escaped = gplx.langs.htmls.Html_entity_.Lt_bry; break;
|
||||
case Byte_ascii.Gt: if (mathjax) escaped = gplx.langs.htmls.Html_entity_.Gt_bry; break;
|
||||
case Byte_ascii.Lt: if (mathjax) escaped = gplx.langs.htmls.Gfh_entity_.Lt_bry; break;
|
||||
case Byte_ascii.Gt: if (mathjax) escaped = gplx.langs.htmls.Gfh_entity_.Gt_bry; break;
|
||||
// case Byte_ascii.Amp: escaped = Const_amp; break; // TOMBSTONE:never escape ampersand; PAGE:s.w:Matrix_(mathematics); DATE:2014-07-19
|
||||
// case Byte_ascii.Quote: if (mathjax) escaped = gplx.langs.htmls.Html_entity_.Quote_bry; break; // TOMBSTONE:do not escape quote; PAGE:s.w:Matrix_(mathematics); DATE:2014-07-19
|
||||
// case Byte_ascii.Quote: if (mathjax) escaped = gplx.langs.htmls.Gfh_entity_.Quote_bry; break; // TOMBSTONE:do not escape quote; PAGE:s.w:Matrix_(mathematics); DATE:2014-07-19
|
||||
default:
|
||||
if (dirty || write_to_bfr)
|
||||
bfr.Add_byte(b);
|
||||
|
||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.xowa.xtns.math; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
|
||||
import org.junit.*;
|
||||
public class Xof_math_mgr_html_tst {
|
||||
@Before public void init() {} private Xop_fxt fxt = new Xop_fxt();
|
||||
@Before public void init() {} private final Xop_fxt fxt = new Xop_fxt();
|
||||
@Test public void Escape_lt_gt_mathjax() { // PURPOSE: escape <>&"; EX:de.w:Vergleich_(Zahlen); DATE:2014-05-10; PAGE:s.w:Matrix_(mathematics) DATE:2014-07-19
|
||||
fxt.Test_html_full_str("<math>a<>b</math>", "<span id='xowa_math_txt_0'>a<>b</span>");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user