haxeui / haxeui-html5

The HTML5 backend of the HaxeUI framework -
http://haxeui.org
MIT License
28 stars 14 forks source link

Excesive html escaping for button text #31

Open karliss opened 4 years ago

karliss commented 4 years ago

Assigning string that contains < or other html special symbols as button text results in &lt; being displayed.

Expected Behavior

Any string can be assigned as button label.

Current Behavior

Label string gets excessively escaped resulting in escape sequence being displayed as label instead of intended text.

Possible Solution

Steps to Reproduce (for bugs)

Run test app described bellow.

Media

button

Test app / minimal test case

package ;

import haxe.ui.HaxeUIApp;
import haxe.ui.core.Component;
import haxe.ui.components.Button;
import haxe.ui.containers.VBox;
import haxe.ui.macros.ComponentMacros;

class Main {
    public static function main() {
        var app = new HaxeUIApp();
        app.ready(function() {
                var main:Component = new VBox();
                app.addComponent(main);
                var button = new Button();
                button.text = "<";
                main.addComponent(button);

                app.start();
        });
    }
}

Context

Your Environment