mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 13:00:47 +00:00
Issue #144 Fixed plaintext export
This commit is contained in:
@@ -92,6 +92,7 @@ public class DefineEditTextTag extends CharacterTag implements BoundedTag, TextT
|
||||
private String stripTags(String inp) {
|
||||
boolean intag = false;
|
||||
String outp = "";
|
||||
inp = inp.replaceAll("<br ?/?>", "\r\n");
|
||||
for (int i = 0; i < inp.length(); ++i) {
|
||||
if (!intag && inp.charAt(i) == '<') {
|
||||
intag = true;
|
||||
@@ -118,7 +119,10 @@ public class DefineEditTextTag extends CharacterTag implements BoundedTag, TextT
|
||||
|
||||
@Override
|
||||
public String getText(List<Tag> tags) {
|
||||
String ret = getFormattedText(tags);
|
||||
String ret = "";
|
||||
if (hasText) {
|
||||
ret = initialText;
|
||||
}
|
||||
if (html) {
|
||||
ret = stripTags(ret);
|
||||
ret = entitiesReplace(ret);
|
||||
|
||||
@@ -110,7 +110,7 @@ public class DefineMorphShapeTag extends CharacterTag implements BoundedTag, Mor
|
||||
*
|
||||
* @param data Data bytes
|
||||
* @param version SWF version
|
||||
* @param pos
|
||||
* @param pos
|
||||
* @throws IOException
|
||||
*/
|
||||
public DefineMorphShapeTag(byte data[], int version, long pos) throws IOException {
|
||||
|
||||
@@ -96,7 +96,7 @@ public class DefineText2Tag extends CharacterTag implements BoundedTag, TextTag,
|
||||
}
|
||||
}
|
||||
if (rec.styleFlagsHasXOffset || rec.styleFlagsHasYOffset) {
|
||||
if (!rec.equals("")) {
|
||||
if (!ret.equals("")) {
|
||||
ret += "\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class DefineTextTag extends CharacterTag implements BoundedTag, TextTag,
|
||||
}
|
||||
}
|
||||
if (rec.styleFlagsHasXOffset || rec.styleFlagsHasYOffset) {
|
||||
if (!rec.equals("")) {
|
||||
if (!ret.equals("")) {
|
||||
ret += "\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user