function ParseBBCode($_x82) { $_x164 = new RTEBBCodeNode(); $_x182 = $_x164; $_x15 = strlen($_x82); $_x207 = $_x15 - 1; $_x97 = 0; while ($_x97 < $_x15) { $_x183 = rtefilter_strpos($_x82, '[', $_x97); if ($_x183 == -1 || $_x183 == $_x207) { $_x182 = $this->InsertNode(RTEBBCodeNode::CreateText(substr($_x82, $_x97, $_x15 - $_x97)), $_x182); break; } $_x208 = strpos($_x82, ']', $_x183); if ($_x208 == -1) { $_x182 = $this->InsertNode(RTEBBCodeNode::CreateText(substr($_x82, $_x97, $_x15 - $_x97)), $_x182); break; } if ($_x183 > $_x97) { $_x182 = $this->InsertNode(RTEBBCodeNode::CreateText(substr($_x82, $_x97, $_x183 - $_x97)), $_x182); $_x97 = $_x183; } $_x184 = substr($_x82, $_x183 + 1, 1); if ($_x184 != '/' && !RTEUtil::IsLetter($_x184)) { if ($_x184 == '*' && $_x183 + 2 == $_x208) { $_x182 = $this->InsertNode(RTEBBCodeNode::CreateTag("*", null), $_x182); $_x97 = $_x183 + 3; continue; } $_x182 = $this->InsertNode(RTEBBCodeNode::CreateText("[" . $_x184), $_x182); $_x97 = $_x183 + 2; continue; } $_x209 = false; for ($_x183 = $_x97 + 2; $_x183 < $_x15; $_x183++) { $_x184 = substr($_x82, $_x183, 1); if ($_x184 == ']') { $_x182 = $this->InsertNode(RTEBBCodeNode::CreateTag(substr($_x82, $_x97 + 1, $_x183 - $_x97 - 1), null), $_x182); $_x97 = $_x208 + 1; $_x209 = true; break; } if ($_x184 == '=') { $_x182 = $this->InsertNode(RTEBBCodeNode::CreateTag(substr($_x82, $_x97 + 1, $_x183 - $_x97 - 1), substr($_x82, $_x183 + 1, $_x208 - $_x183 - 1)), $_x182); $_x97 = $_x208 + 1; $_x209 = true; break; } if (RTEUtil::IsLetter($_x184)) { continue; } break; } if ($_x209) { continue; } $_x97++; } $_x182->NextNode = new RTEBBCodeNode(); $_x182->NextNode->PrevNode = $_x182; return $_x164; }